Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Regular Coder
    Join Date
    Feb 2008
    Location
    Edinburgh - Scotland
    Posts
    107
    Thanks
    0
    Thanked 12 Times in 12 Posts
    Hmm, try looknig for a wrapping option - not sure though....

    The gridlayout you were using could be the problem then - try FlowLayout...

  2. #17
    New Coder
    Join Date
    Oct 2010
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by renegadeandy View Post
    Hmm, try looknig for a wrapping option - not sure though....

    The gridlayout you were using could be the problem then - try FlowLayout...
    but if its not GridLayout, won't the two sections of the code be messed up anyways?

  3. #18
    New Coder
    Join Date
    Oct 2010
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts
    and which GridLayout, I have two of them in use right now.

  4. #19
    Regular Coder
    Join Date
    Feb 2008
    Location
    Edinburgh - Scotland
    Posts
    107
    Thanks
    0
    Thanked 12 Times in 12 Posts
    Well change everything to FlowLayout and then resize the window - see if that changes the labels at all - in combination with doing the setSize and updating the label's draw.

  5. #20
    New Coder
    Join Date
    Oct 2010
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts
    No, that's not working.

  6. #21
    New Coder
    Join Date
    Oct 2010
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts
    When I do FlowLayout, the buttons move into the middle, and the label is a tiny box. :/

  7. #22
    Regular Coder
    Join Date
    Feb 2008
    Location
    Edinburgh - Scotland
    Posts
    107
    Thanks
    0
    Thanked 12 Times in 12 Posts
    Anders - the reason you are struggling is simply because your not using the right tool for the job.

    If you try to screw a screw with a hammer , if you can do it, it will take you years.

    If you try to screw a screw with a screwdriver, you can do it, it will take you seconds.

    So I would go back to the project I made - and take the 10 minutes it would take to understand the JTable object and the AbstractTableModel class and show something unusual and better than playing with silly labels.

  8. #23
    New Coder
    Join Date
    Oct 2010
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Well, I actually found an even easier way and I feel insanely retarded for not using it before. JTextArea.

    I just need to get my scrollpane working now and I am done.

    EDIT: Oh, and what I was trying to do with my JLabel was impossible, JLabel never allows more than 1 line on text. Just if your curious.


 
Page 2 of 2 FirstFirst 12

Posting Permissions

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