Results 1 to 3 of 3
  1. #1
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    5

    Default new line in CheckBox

    i have one JCheckBox that should display two words as text but in two lines. is this possible and if yes how?

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,361
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by j2me64 View Post
    i have one JCheckBox that should display two words as text but in two lines. is this possible and if yes how?
    Use html code:

    Java Code:
    "<html>line one<br>line two</html>"
    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    5

    Default

    Quote Originally Posted by JosAH View Post
    Use html code:

    Java Code:
    "<html>line one<br>line two</html>"
    kind regards,

    Jos

    i had already tried with html code but it was ignored because i added a non-html string to it. but now i got a solution ("<html>" + myString + "</html>"), where myString contains the <br>. thanks.
    Last edited by j2me64; 03-14-2011 at 03:22 PM.

Similar Threads

  1. Replies: 1
    Last Post: 02-13-2011, 03:09 PM
  2. Replies: 3
    Last Post: 07-27-2010, 09:52 AM
  3. Replies: 2
    Last Post: 07-02-2010, 02:20 PM
  4. CheckBox
    By boss in forum NetBeans
    Replies: 3
    Last Post: 01-17-2010, 04:51 AM
  5. Replies: 4
    Last Post: 09-10-2009, 10:18 AM

Tags for this Thread

Posting Permissions

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