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 sling swing?
What is an event and what are the models available for event handling?
Which layout does swing use by default?
What is java swing package?
What are the components of java swing?
What is import javax swing jframe?
Which method of the Component class is used to set the position and size of a component?
What is swing api?
What does javax swing do?
What is pane in swing?
What is swing control?
Can a class be it?s own event handler? Explain how to implement this?
What is java swing application?
What is swing gui?
What is the purpose of action interface in swing?