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

NX: Simple resize solution

 
Morgan Bath
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For me the critical component was the Search panel. It had a few labels and buttons and as a flowlayout was prone to have buttons drops down when resized (and usually disappear below the JTable. I decided that this would be the first component added to the Frame, the frame would then be packed and the width of the frame (with a 10 pizel added offset) at that point stored in an int minWidth. Other panels inc the JTable are then added (making the frame wider and higher instantly).
Then on any resize event if the width is set below the minWidth I simple called setSize(minWidth,getWidth());
It works (although the correction only happens AFTER they release the mouse button) on my windows XP system. Anyone know if I might get problems with such a solution on other systems?
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds good to me.
I wish I had done something like that before submitting.
My frame can be resized down to a speck...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic