Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Layout manager and resizing

 
William Smith II
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a quick question.

I am using the SpringLaout and it's working out great. But when I make my window really small, my JTextField and JComboBox do not resize as I expect them to. They go right off the right side of the screen until I make the window larger. Eventually, the JFrame continues to get larger, but the JTextField and JCombobox stick to their maximum size.

Is there a way to get JTextField and JComboBox resizing as I expect them to?

Will I lose marks if I set the minimum size of the JFrame to a large enough window size to bypass this problem?
 
Ken Krebs
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it make sense to allow the user to reduce the size of the window to a point where it is unusable ?

You might very well lose points for doing that.
 
William Smith II
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can get around it by setting the JFrame to say 640x480 minimum. Then there is no issue.

But I guess I want to know: why I can't get JTextField and JComboBox to resize.

I even tried to put a spring in between the right side of the JFrame and the right side of the text field, forcing at least 10 pixels. But that did not solve the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic