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


Please Help Members By Posting Answers For Below Questions

What is Java Swing?

610


Why swing is used in java?

543


Is swing part of core java?

538


What is the function of abstractaction class?

596


What is swing control?

519






What are differences between swing and awt?

535


What is import javax swing jframe?

560


What is swing?

610


How to add calendar in java swing using eclipse?

782


What is swing container?

533


Is swing an adjective?

561


What are heavyweight components? What is lightweight component?

536


What is difference between awt and swing?

577


What is container in java swing?

538


How to create image slideshow in java swing?

621