Hi, I have got a pblm. I have designed a menu. On clicking a menuitem, a JInternal Frame is displayed. Inside that JInternalFrame, couple of buttons are displayed. On clicking a particular button, the existing JInternalFrame should vanish and in it's place, the java pgm defined in the actionPerformed of that Button should appear as another JInternalFrame. Arun Martin.
Joined: Jun 27, 2000
Have you set up the button on the internalframe to close that internal frame? If you haven't, you need to. check out the dispose() method in JFrame. Once that structure is in place,use the getX() and getY() to find the origin position of your dying internalframe before you dispose of it. Then call your new Internalframe. Once it exists, you can use either setX/setY or you might use reshape. This should get you about where you want to be I think.
Joined: Dec 01, 2000
Hi Chris, Thanks for your valuable suggestion. The main pblm was that I was trying a JInternalFrame from another JInternalFrame. I added JInternalFrame to a Desktop Pane and the solution was obtained. Thanks once again for the valuable guidelines. bye Arun.