• Post Reply Bookmark Topic Watch Topic
  • New Topic

Resize Problem  RSS feed

 
Rob Bass
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a JPanel with a BoxLayout. I have a lable and then a JTextField. When the panel is created the layout looks good, but when I maximize the JFrame the JTextField becomes HUGE. How can I get the JTextField to stay one size?
Any help would be appreciated.
Thanks,
Rob
 
cynthia ****
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi rod,
Have you tried using the setPreferredSize() method.the BoxLayout gives preference to the size you set.and try using the setMinimumSize() also.
I hope this helps.
 
Rob Bass
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will try this.
Thanks,
Rob
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!