Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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.......

Answers were Sorted based on User's Feedback



When i m clicking on next another frame is open but i want to hide the previous frame...........bu..

Answer / 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

When i m clicking on next another frame is open but i want to hide the previous frame...........bu..

Answer / guest

use the setVisible method to hide the frame.
i.e) this.setVisible(false);

Is This Answer Correct ?    6 Yes 0 No

When i m clicking on next another frame is open but i want to hide the previous frame...........bu..

Answer / anjani kumar jha

use dispose(); method

Is This Answer Correct ?    7 Yes 4 No

When i m clicking on next another frame is open but i want to hide the previous frame...........bu..

Answer / doris

Hi, u can use this code snippet...

new MAIN_STORING().setVisible(true);
this.setVisible(false);

n/b: assuming that the keyword 'this' is pointing to the
one u want to go off when u click for MAIN_STORING page.

Goodluck!

Is This Answer Correct ?    3 Yes 0 No

When i m clicking on next another frame is open but i want to hide the previous frame...........bu..

Answer / deepak pawar

you can use the following statment
to yhe next button action listner
this.setVisible(false);

Is This Answer Correct ?    4 Yes 1 No

When i m clicking on next another frame is open but i want to hide the previous frame...........bu..

Answer / prerna keshari

You certainly don't want to destroy frame1, so do not use
despose(). just use setVisible() method and provide the
argument as false.

Is This Answer Correct ?    3 Yes 0 No

When i m clicking on next another frame is open but i want to hide the previous frame...........bu..

Answer / guest

use the setVisible method to hide the frame.
i.e) this.setVisible(false);

Is This Answer Correct ?    3 Yes 1 No

When i m clicking on next another frame is open but i want to hide the previous frame...........bu..

Answer / loyola

Actually every ones question is how to use the first JFrame obj in another class to hide that. you can do with package concept. so if you use try this you will not get any error and you prog will run.

Is This Answer Correct ?    0 Yes 0 No

When i m clicking on next another frame is open but i want to hide the previous frame...........bu..

Answer / vimal pratap singh

use this one for visible or not this.setVisible(false);

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More Swing Interview Questions

What are the different types of layout managers used in swing?

0 Answers  


What things to do to make a web browser compatibale for swing components?

1 Answers   Tesco, TracFone, Wipro,


what are the steps required in creating an empty table drop?

0 Answers  


How to render an html page using only swing.

0 Answers  


What are the containers available in swing?

0 Answers  


What is the mean of swing?

0 Answers  


What is the use of swing in java?

0 Answers  


When we should go for codebase in applet?

0 Answers  


What are swings awt?

0 Answers  


What are the differences between Swing and AWT?

0 Answers  


What is java awt and swing?

0 Answers  


Can a class be it?s own event handler? Explain how to implement this?

0 Answers  


Categories