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 the function of abstractaction class?
How to create a swing gui in java?
How to change button color in java swing?
What is jfc swing in java?
How to perform action on button in java swing?
What is an on stage swing?
What is swing and awt in java?
What are swings?
What are the swing components?
Which method of the Component class is used to set the position and size of a component?
Why swing is used in java?
Explain the difference between awt and swt.
What is import javax swing in java?
Why should any swing call back implementation execute quickly?
What are the benefits if Swing over AWT?