DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Oct 2004
    Location
    Chicago
    Posts
    108

    Angry Working with JTextArea

    I am writing a simple text editor, I am having problems with a JTextArea.

    I can enter text and everything is fine, but when I save it into a text file the line breaks are not recognized. If i open that file with notepad it simply shows a box in place of the line break. Also when I load that text file into the JTextArea the boxes are not there, and the line breaks are just not present.

    My second problem is printing. I found a way to print text to the printer, using a print stream, but when I print anything from my TextArea each line is tabbed over.

    Example

    Code:
    Text
          Text
                Text
                      Text

    Is there any way I can fix that, or is there a different way to print text to the default printer?

    Thanks in advance
    Last edited by Wizard1988; 12-06-2005 at 09:33 AM.

Similar Threads

  1. Replies: 1
    Last Post: 12-05-2001, 06:12 AM
  2. changing working dir in Java
    By Jim in forum Java
    Replies: 1
    Last Post: 02-18-2001, 01:58 PM
  3. VSS:sharing same working folder without multiple checkouts
    By rahul phatak rahulphatak in forum ASP.NET
    Replies: 0
    Last Post: 06-01-2000, 05:41 PM
  4. Sysinfo not working GetSystemPowerStatus not working
    By Thomas Hauff in forum VB Classic
    Replies: 0
    Last Post: 04-08-2000, 10:15 PM
  5. Sysinfo not working GetSystemPowerStatus not working
    By Thomas Hauff in forum VB Classic
    Replies: 0
    Last Post: 04-08-2000, 10:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links