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
What is content pane in swing?
Which types of components are used in designing swing based gui?
What is import javax swing in java?
What are the two key features of swing?
Is javafx better than swing?
Which containers use a border Layout as their default layout in swing?
How to create image slideshow in java swing?
How to create a swing gui in java?
How to generate bill in java swing?
Is swing part of core java?
What is the base class for all swing components?
What is the use of double buffering in swings?
What is difference between awt and swing?
What is swing delegation event model in java?
How does accessibility works in swings?