Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Please Any Fast Help For Small Problem ,, i tired :( Maybe easy for you :)

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    17
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Please Any Fast Help For Small Problem ,, i tired :( Maybe easy for you :)

    i need to make a JTextArea like that in pic
    a.JPG
    how i can make it :/

    Thanks


  2. #2
    Forum VIP
    Join Date
    Jun 2011
    Posts
    317
    My Mood
    Bored
    Thanks
    47
    Thanked 89 Times in 74 Posts
    Blog Entries
    4

    Default Re: Please Any Fast Help For Small Problem ,, i tired :( Maybe easy for you :)

    You can use HTML in a JTextArea. See How to Use HTML in Swing Components

  3. The Following User Says Thank You to ChristopherLowe For This Useful Post:

    Zuckerberg (January 17th, 2014)

  4. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Please Any Fast Help For Small Problem ,, i tired :( Maybe easy for you :)

    Quote Originally Posted by ChristopherLowe View Post
    You can use HTML in a JTextArea. See How to Use HTML in Swing Components
    You might be thinking of a JTextPane/JEditorPane, in which the content type can be set to "text/html". If you wish to change the color of a particular range of text within a JTextArea, modify its highlighter with a new HighlightPainter, or alternatively use a TextComponent that allows for HTML or has the appropriate Document (StyledDocument) to allow for custom styles.

  5. The Following User Says Thank You to copeg For This Useful Post:

    ChristopherLowe (January 16th, 2014)

  6. #4
    Junior Member
    Join Date
    Dec 2013
    Posts
    17
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Re: Please Any Fast Help For Small Problem ,, i tired :( Maybe easy for you :)

    big thanks i hope it work

    i don't understand you copeg :/

  7. #5
    Member andbin's Avatar
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    443
    Thanks
    4
    Thanked 122 Times in 114 Posts

    Default Re: Please Any Fast Help For Small Problem ,, i tired :( Maybe easy for you :)

    Quote Originally Posted by Zuckerberg View Post
    i need to make a JTextArea like that in pic
    The following is just an example:

    JEditorPane editor = new JEditorPane("text/html", "<html><body>Hello<br><font color='red'>World</font><br><font size='7'>Bye</font></body></html>");

    It's not the only possibility. The other well known option is to use a "styled" text (using directly a StyledDocument object) in JTextPane.
    Andrea, www.andbin.netSCJP 5 (91%) – SCWCD 5 (94%)

    Useful links for Java beginnersMy new project Java Examples on Google Code

  8. The Following User Says Thank You to andbin For This Useful Post:

    Zuckerberg (January 17th, 2014)

  9. #6
    Junior Member
    Join Date
    Dec 2013
    Posts
    17
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Re: Please Any Fast Help For Small Problem ,, i tired :( Maybe easy for you :)

    thanks it's work ^_^ andbin

Similar Threads

  1. [SOLVED] Small problem
    By keepStriving in forum What's Wrong With My Code?
    Replies: 4
    Last Post: October 23rd, 2013, 06:31 AM
  2. i am tired due to this error
    By amul in forum JDBC & Databases
    Replies: 1
    Last Post: June 27th, 2013, 03:00 PM
  3. fast food java problem
    By Anonymous08 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 14th, 2013, 03:53 AM
  4. Small problem, help please?
    By Jonathansafc in forum What's Wrong With My Code?
    Replies: 33
    Last Post: September 3rd, 2011, 06:46 PM
  5. small problem ... I need help
    By Ashar in forum Loops & Control Statements
    Replies: 4
    Last Post: December 4th, 2009, 11:26 AM