ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  Swing
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
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.......
 Question Submitted By :: Anjani Kumar Jha
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
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 ?    0 Yes 0 No
Romesh Nongthombam
 
  Re: 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
# 2
use dispose(); method
 
Is This Answer Correct ?    0 Yes 0 No
Anjani Kumar Jha
 
 
 

 
 
 
Other Swing Interview Questions
 
  Question Asked @ Answers
 
what do u mean by GUI framework  1
What are all the components used in Swing?  1
What is the default look and feel of a Swing Component?  2
Name the borders provided by Swing? Accenture1
What is the difference between AWT and Swing ? TCS1
Difference between AWT and Swing compenents?  2
Does Swing contains any heavy weight component?  4
How are Swing and AWT be differentiated? Wipro2
I want to change the appearance of Frame in Runtime, what class can be used to do this? Wipro1
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.......  2
how can u handle runtime exceptions in java plz explain with examples briefly? Fujitsu2
What is JTable and what is its purpose?  3
What is meant by Swing?  4
when we right click on the JTable using mouse it works properly but how to right click on JTable in java using keyboard what should be the code for the same.....? Thanks Nitin  1
Explain the differences between an applet and a Japplet? Satyam1
What is the base class for all of swing components?  3
What is the corresponding Layout for Card in Swing? Patni2
What are the benefits of using Swing over AWT?  1
can we create a object in static block class A { static { A a=new A(); } }  5
What is the use of JTree?  2
 
For more Swing Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com