Results 1 to 3 of 3
  1. #1
    mustahsan4u is offline Member
    Join Date
    Nov 2007
    Posts
    1
    Rep Power
    0

    Unhappy Problem in Text Editor

    Hello Dear
    I am new in this forum. I have a text editor running in an applet.
    I am using JTextPane and the problem is that if any character is pressed with out spacebar that character string moves outside the Textpane but never moves to next line until a space bar or enter key is pressed. So how to move the cursor to next line (Same as it works in MS WORD)
    Please solve the problem. Thanks
    Mustahsan Saeed
    Last edited by mustahsan4u; 11-20-2007 at 08:38 AM.

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    8

    Default

    Java Code:
    import javax.swing.*;
    
    public class Test {
        public static void main(String[] args) {
            System.setProperty("swing.aatext", "true");
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new JScrollPane(new JTextPane()));
            f.setSize(500,400);
            f.setLocation(200,200);
            f.setVisible(true);
        }
    }

  3. #3
    Claud is offline Member
    Join Date
    Mar 2008
    Posts
    1
    Rep Power
    0

    Default New member

    Hello,

    My name is claud!
    I am new in Java. The reason I want to start with JAVA is that I want to build an application.

    Thank you for all the information

Similar Threads

  1. Replies: 17
    Last Post: 07-13-2009, 05:44 AM
  2. Text Area problem
    By mcal in forum New To Java
    Replies: 0
    Last Post: 02-11-2008, 09:42 PM
  3. Editor for java
    By thirdy_veritech in forum Other IDEs
    Replies: 6
    Last Post: 12-24-2007, 06:17 AM
  4. Replies: 0
    Last Post: 07-17-2007, 03:30 PM
  5. Xml Editor
    By Marty in forum XML
    Replies: 3
    Last Post: 05-11-2007, 09:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •