On 9 26 , 12 01 , Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
On Tue, 25 Sep 2007 14:08:32 -0700, iher...@gmail.com wrote, quoted or
indirectly quoted someone who said :
I have a question about how to resize the JPanel with mouse.
Resizing a panel implies other Components will have to change size and
position as well. Perhaps you might want to rethink and use Frames or
JFrames which can be sized or resized independently, without any
programming effort.
The problem I foresee is every micro change implies a validate/repaint
of the whole app. That might not be smooth or fast enough..
You can check by simulating with timed programmatic micro changes ho
the panels with validate/repaints, or by seeing the response to
changing the shape of the entire app Frame. You want to run these
experiments on the least skookum computer that will be running your
app.
--
Roedy Green Canadian Mind Products
The Java Glossaryhttp://mindprod.com
The two panels are resided in the mainPanel. And I want to change one
panel's width without the mouse.Of course the other pane's width will
be affected.
There are a few questions left.
1. Which component should register to listen to the event?
2. How to determine the mouse is moving over the border of the two
panels.
3. I think the method that will be used is the setPerferredSize(), but
I do not the detailed implementation.
I have tried myself by implementing a simple program but failed.
Anyone who has experience in the java gui programming knows this?
Please give some hints. Thank you for the help.
have a hard time helping you. So please describe simply what you want
your GUI to do.