How to call a custom jDialog
I am using NetBeans 5.5 and created a custom jDialog. I want to be
able to call the custom jDialog from another Form. The dialog I created
allows a user to set parameters for a template. The template saves
basic employee information to a text file for populating a time card.
When the template needs to be altered, the user would call the
template, which is the custom jDialog, to reset the template.
I thought I could just instantiate the custom jDialog class I created and
use a 'go()' method to bring up the templateChooser jDialog but
nothing seems to be working. Here is some sample code:
Here are sample code:
publicclass templateChooserextends javax.swing.JDialog{
/** Creates new form templateChooser */
public templateChooser(){
}//end template Chooser()
publicvoid go(){
initComponents();
templateAttributesEnabled(false);
jCmbxDutyDaysEnabled(false);
formLoadData_onDialogOpen();
}//end go
. . .
}//end of templateChooser
publicclass tcFormextends javax.swing.JFrame{
public tcForm(){
initComponents();
//jf.setVisible(true);
}//end constructor
privatevoid jMenuItem_OpenTemplateMouseClicked(java.awt.event.MouseEvent evt){
// TODO add your handling code here:
//call the template dialag box
templateChooser tc =new templateChooser();
tc.go();
}// end jMenuItem
...
}//end class

