Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Show a hidden frame previously from another from
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Hamza
Show a hidden frame previously from another from
1 Answer(s)      a year and 9 months ago
Posted in : Java Beginners


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.


Advertisement
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...;One frame has five component, user can drag and drop component from one
frame update another frame.
frame update another frame.   How do I make a link or form in one frame update another frame
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
Calling awt Frame methods from subclass
Calling awt Frame methods from subclass  Calling awt Frame methods from subclass
one frame update another frame
one 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. another class: public class Askvalues extends JFrame
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
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
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
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
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
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- SELECT * FROM tablename; Thanks
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 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
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
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
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
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
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
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
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
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
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
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 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
Advertisements
 

 

 

DMCA.com