Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resizing UI

 
Shannon Sims
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As of right now, my UI is set initially with a size, however when you expand the window to max, all the components get spread out (a lot of space between components). So, what is Sun looking for? Does the components have to be evenly spaced out?

-Thanks!
 
Ben Zung
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are many ways of controlling them. The immediates I thought are 1. you can use different layout manager. 2. you can put all your compoments in one panel and set a fixed size for the panel.

BW
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben wung:
There are many ways of controlling them. The immediates I thought are 1. you can use different layout manager. 2. you can put all your compoments in one panel and set a fixed size for the panel.

BW


I'd go with a different LayoutManager. In my project I use nested BorderLayouts. The outer one contains the toolbar alowing it to dock on any side with a panel in the center that also uses BorderLayout. Within that panel I have the JTable in the center and a status bar in the south. I don't have booking or searching panels in the main GUI, I bring these up as modal dialogs when needed.

Whatever solution you pick, you probably want to maximize the space available to the table.
 
Shannon Sims
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will set a fixed size on my panels. I'm not familiar with toolbars, so I will look into it. Perhaps using a toolbar will resolve my issue.

Thanks Ben and Peter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic