When i m clicking on next another frame is open but i want
to hide the previous frame...........but it is not
happening....still both frame are visible........how to
make one frame to hide.......please help me.......
Answer Posted / romesh nongthombam
The best way to do in such condition is used the Card layout
so that you can easily process next previous function.
If you want to hide the frame, you can use like this
JFrame f1 = new JFrame("Frame 1");
JFrame f2 = new JFrame("Frame 2");
to hide f1, call f1.setVisible(false);
to show f2, call f2.setVisible(true);
| Is This Answer Correct ? | 34 Yes | 7 No |
Post New Answer View All Answers
Write a program to paint the off-screen buffer in swings
How to perform action on button in java swing?
Why are swing components called lightweight?
What is a swing application?
What is an event handler in swing?
Is swing thread-safe?
What is the use of swing in java?
What is a component in swing?
How is parsing html used in swing?
What is the difference between invokeAndWait() and invokeLater()?
Why swings are used in java?
What is an event in Swing?
What is the difference between a scrollbar and a jscrollpane ?
What is jpanel swing?
Is there any heavyweight component in swings?