A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
Swing / AWT / SWT
Joined: May 01, 2008
May 03, 2008 01:53:00
How can I change Jpanel Resize
Joined: Mar 22, 2005
May 03, 2008 03:08:00
Check out the setMinimumSize, setPreferredSize and setMaximumSize methods.
Joined: Oct 13, 2005
May 03, 2008 04:00:00
You don't. There isn't actually a resize() method in
, but there is in Component, but it is deprecated. Read the details in the
If you do alter the size of a Component, you may have to call validate() and pack() on its enclosing Container as well.
Joined: Oct 27, 2005
May 03, 2008 06:53:00
It doesn't guarantee the panel will get that size at all. It's all up to the layout manager of the enclosing container.
pack() is only part of Window and its subclasses, as well as
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
What to draw on?
WA #2 ..... word association
Poping up a JPanel in JApplet
obtaining the component tree for a particular JPanel
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015