Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create child window? 1

Status
Not open for further replies.

sagn

Programmer
Jun 7, 2001
166
US
I am *VERY* green at this, so this is a very basic question.
I apologize.

I have my main form up and running. I have successfully built classes to perform actions upon certain events.
I now would like to be able to bring up another window (form) upon some action. But have been unsuccessful.
:(

I followed the debugger and it appears that all code statements I expected to go through it went through.

I have added the following to the
main form code

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// List is the panel I want to appear
// ColumnList is a public class. It only produces a Panel
ColumnList List=new ColumnList();
List.setVisible(true);



}

thanks for any help
 
You need to use something which is derived from java.awt.Window, such as javax.swing.JFrame, javax.swing.JDialog, java.awt.Frame or java.awt.Frame. These can open as separate windows and contain your panel.

Tim
 
Thank You so much!

In fact, I was able to open a javax.swing.JDialog object
but did not know why!

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top