Show a hidden frame previously from another from

Show a hidden frame previously from another from

How can i show a hidden frame previously by this code:

jframe_name.hide();

and make it visible from another frame

i'm waiting for the answer, and i'll be thankfull.

View Answers

April 6, 2013 at 3:47 PM

Hello everybody, I found the solution of this problem, this is it:

If you pass your FirstForm to the SecondForm class (for example using a constructor parameter) the SecondForm instance can make the original FirstForm instance visible again instead of creating a new one.

For example:

public class SecondForm extends JFrame{
  private final FirstForm firstForm;
  publicSecondForm( FirstForm form ){
  firstForm = form;
 }

private void jButton1ActionPerformed(java.awt.event.ActionEventevt) {                                         
  firstForm.setVisible(true);
  setVisible(false);
  dispose();
 }  
}

and in your FirstForm class:

private void jButton3ActionPerformed(java.awt.event.ActionEventevt) {
 SecondForm secondform = new SecondForm( this );
 secondform.setVisible(true);
 setVisible(false);
 dispose();
}









Related Tutorials/Questions & Answers:
Show a hidden frame previously from another from
Show a hidden frame previously from another from  How can i show a hidden frame previously by this code: jframe_name.hide(); and make it visible from another frame i'm waiting for the answer, and i'll be thankfull
how to go from one frame to another frame in swings - Java Beginners
how to go from one frame to another frame in swings  Hi, My task is to go from one frame to another.......... let us think that iam having two buttons on a frame........button names are ok and next........ when iam clicking
Advertisements
Drag and Drop components from one frame to another frame
Drag and Drop components from one frame to another frame... button etc.) from one frame to another frame. In this code we have used..., user can drag and drop component from one to another frame. Download Source
frame update another frame.
frame update another frame.   How do I make a link or form in one frame update another frame
Use varibles from another class
Use varibles from another class  **I have two classes. class 1:** public class askfigures extends JFrame { method from class1: public void... in another class. (adsbygoogle = window.adsbygoogle || []).push
Calling awt Frame methods from subclass
Calling awt Frame methods from subclass  Calling awt Frame methods from subclass
pass data from java frame to file
pass data from java frame to file  i want to write the data to file, and data must be copy from java frame java frame contains 7-8 labels n below that 1 table. i want store all this data to 1 file. plz help me
display the hidden text from that row, when onclick on a row of 1- 10
display the hidden text from that row, when onclick on a row of 1- 10  Using JSP: I'm displaying a set of values from the databse in a table rows (1... the page to servlet. In the servlet I'm retreiving the hidden text as a parameter
Loading a jsp page (with record from database) from another jsp page
Loading a jsp page (with record from database) from another jsp page  ... with records from database(against Serial no and year).That is, as soon as Getdata.jsp will be loaded, it will show the first record. How can I do
one frame update another frame
one frame update another frame  How do I make a link or form in one frame update another frame
calling one jsp from another jsp page
calling one jsp from another jsp page  need coding for calling one jsp from another jsp including the xml file.Its urgent
How you will Show all data from a table.
How you will Show all data from a table.   How you will Show all data from a table.   Hi, following query is used to show all the data of the table-ADS_TO_REPLACE_1 SELECT * FROM tablename; Thanks
mysql select into table from another table example
mysql select into table from another table example  Can you suggest the correct example of select into table from another table example in MySQL... from one table into another table. Check the example at MySQLselect into new
File copy from one directory to another in java
File copy from one directory to another in java  I am trying to find very good code example for copying a file from one directory to another... from a directory to another directory. How to achieve this? Is there any API
passing from 1 jsp to another - JSP-Servlet
passing from 1 jsp to another  Hi Sir, What are the ways and means of passing from 1 jsp page to another page.what are the different types of methods?  Hi Friend, You can use tag,sedRedirect() method
retrieve record from table and show it in HTML
retrieve record from table and show it in HTML  Hi. I have a field...,trichy,kanchipuram for a single record. I have to retrieve these data from... as single values like chennai as one value, trichy as one value. and i have to show
update one table from another table
update one table from another table  hello, i need to update one table fields by using another table fields. I have to tables Products.... for example TotalQuantity field from Products table should be updated if i
Need to access data from another application
Need to access data from another application  Hi Tech masters, I want to develop a reporting application.for that I need to access data from a third party application. I want to access data from a software called service
How to forward the control from one jsp to another?
How to forward the control from one jsp to another?  Hi! This is Prasad Jandrajupalli. I have the 3 JSP's, but I want communicate with each... is not communicate with the Third JSP. I want forward the control from first jsp to second
How to close a frame on action event of a button from a different class ?
How to close a frame on action event of a button from a different class ?  How to close a frame on action event of a button from a different class... was opened when I had press first jbutton from control-frame) when I press second
copying data from one table to another
copying data from one table to another  i need to copy data from one table to another table.. i.e the 1st eid of employee table must be copied to the 1st eid in appusers table, 2nd eid of employee to the 2nd eid of appusers
how to output text from comboBox from first frame to textField on the second frame? please help me.. thank you in advance..
how to output text from comboBox from first frame to textField on the second frame? please help me.. thank you in advance..  how to output text from comboBox from first frame to textField on the second frame? please help me
passing data from one jframe to another
passing data from one jframe to another  I have two JFrame,built by using the GUI Editor netbeans 6.9.i have to pass a data from a Jtextfield in the first Jframe to another JLabel in the other JFrame.Can you please help me,how
how to pass a string from one class to another
string from one class to another. import java.util.*; class A{ static String... String from class A: "+b); } }   Here is another example of passing string from one class to another. import java.io.*; class Class1 { public
get the value from another class - Java Beginners
get the value from another class  Hello to all, I have stupid question. I have main.java and ConfigXML.java(read my config xml file). Code from...)).getNodeValue().trim(); from my ConfigXML.java in main.java. Sorry for my bad
How to call the run method from another class?
How to call the run method from another class?  Sorry... run() { new FereastraPrincipala().setVisible(true); from the class... want to call this from AdaugaComanda.java, so that changes can be seen
How to navigate from one jsf to another in eclipse
How to navigate from one jsf to another in eclipse  Hi there is my...; <from-view-id>/JSF/UserDetail.jsp</from-view-id> <navigation-case> <from-outcome>success</from-outcome> <
Data Conversion from int to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from int primitive type to another data type like String, boolean and char etc
Data Conversion from String to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from String primitive type to another data type like int, boolean and char etc
Data Conversion from short to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from short primitive type to another data type like String, boolean and char etc
Data Conversion from byte to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from byte primitive type to another data type like String, boolean and char etc
Data Conversion from float to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from float primitive type to another data type like String, boolean and char etc
Data Conversion from double to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from double primitive type to another data type like String, boolean and char etc
Data Conversion from long to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from long primitive type to another data type like String, boolean and char etc
How to show data from database in textbox in jsp
How to show data from database in textbox in jsp   How to show data from database in textbox in jsp   Here is an example that retrieve the particular record from the database and display it in textbox using JSP. <
to bring checked data from one page to another
to bring checked data from one page to another  thanks for your help but my problem is different, i am stating my problem below. in my project... fetching data from the database on second jsp page with checkbox corresponding each
another frame by using awt or swings
another frame by using awt or swings  how to connect one frame to another frame by using awt or swings
swings:how to link from one form to another form
swings:how to link from one form to another form  how to link from one form to another form
how to copy file from one directory to another in java with examples
how to copy file from one directory to another in java with examples  how to copy file from one directory to another in java with examples? I want... copy from one directory to another in java. Thanks
how can we pass parameters from jsp href to another servlet
how can we pass parameters from jsp href to another servlet  how can we pass parameters from jsp href to another servlet
how to write function of copy from one to another location in this code
how to write function of copy from one to another location in this code  I need to write a code to copy a file from one location to another using... ); } public void actionPerformed(ActionEvent e) { Chooser frame = new Chooser
problem in sending data from one ip to another ip in JAVA
problem in sending data from one ip to another ip in JAVA  Hi guys . this is naveen kumar...i need a help. i want to connect one ip to another ip (like ping),after that i want send the data with my system(Ip) to another ip
retrive article from sql databse and show using php
retrive article from sql databse and show using php  hello sir i have sql database which i store articles.i want to show these article... code only for show these content
Pass cookie from one site to another within the same domain
Pass cookie from one site to another within the same domain  Hi, I want to pass a cookie from one website to another within the same domain. This is just to identify whether the same user is logged in or not. Can anyone help me
File copy from one drive to another. - Java Beginners
File copy from one drive to another.  I want to copy a .mp3 file from one drive(let d: drive)to another drive(let e: drive) in my Windows XP. How can I do
calling one jap page from another jsp page
calling one jap page from another jsp page  i created a button in one jsp page i need to call another jsp page as an action to that button. so how can i call.. plz any one explain. its urgent
how to pass an array from one jsp to another jsp - JSP-Servlet
how to pass an array from one jsp to another jsp  hi friedns, can any One tell me how to send an array from one jsp to another jsp,pls any one send the code for this.also porvid the code how to retrive the arry in another jsp
How to show only hidden files in Terminal?
How to show only hidden files in Terminal?  Hi, I want to list all the hidden files in a directory. How to show only hidden files in Terminal...; ence symbolic links .?* will only state hidden files Thanks
How to show only hidden files in Terminal?
How to show only hidden files in Terminal?  Hi, I want to list all the hidden files in a directory. How to show only hidden files in Terminal...; ence symbolic links .?* will only state hidden files Thanks
How to show only hidden files in Terminal?
How to show only hidden files in Terminal?  Hi, I want to list all the hidden files in a directory. How to show only hidden files in Terminal...; ence symbolic links .?* will only state hidden files Thanks

Ads