• Post Reply Bookmark Topic Watch Topic
  • New Topic

Component resizing

 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am writting a stock controlling program.In that, I am doing some thing like this. When the user selects an item code from a combo box the measuring type(Quantity type) is taken from a databasedandplaced in a combo box. The problem is depending on the values it gets as quantity type the size of the combo box resizes. I am using GridBagLayout for the laying out purposes. I used JBuilder 8 to design the program. Could you please tell me how to specify a component which doesn't resizes on the value it ishaving.
Thanks
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
Tim Troy
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't tried this with all layouts, but, this helps me most of the time.
 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply,
I am able to achieve what I want by the setPreferredSize().
Thank you again.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!