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 import javax swing in java?
What method is used to specify a container's layout?
What is swing api?
What is sling swing?
What is java swing used for?
What is content pane in swing?
What is java swing components?
What is swing control?
Why does JComponent have add() and remove() methods but Component does not?
Is java swing deprecated?
How is multi-threading gets implemented using swing?
What is the use of swing in java?
What is swing framework in java?
Which swing methods are thread-safe?
What is difference between swing and awt?