Hi all,
Please can you help with this "simple" problem. I need to open a JFrame from an JApplet with multiple components.
The code I have so far is:
JApplet:
In constructor:
jbtnAdd.addActionListener(this);
In method:
public void actionPerformed(ActionEvent ae) {
jbtnAdd.setEnabled(false);
new ShiftSwapForm("Create New Shift Swap", jbtnAdd);
}
JFrame:
Field:
private JButton launch;
Constructor:
public ShiftSwapForm(String title, JButton launch) {
super(title);
this.launch = launch;
}
public void actionPerformed(ActionEvent ae) {
dispose();
launch.setEnabled(true);
}
OK. I have no idea what I'm doing wrong. The button in the applet gets disabled but the frame does not appear. This works in a very simple example but not in my application. I must be overlooking something very simple.
Thank you in advance for any help.
Clinton
"The important thing is not to stop questioning." - Albert Einstein
Please can you help with this "simple" problem. I need to open a JFrame from an JApplet with multiple components.
The code I have so far is:
JApplet:
In constructor:
jbtnAdd.addActionListener(this);
In method:
public void actionPerformed(ActionEvent ae) {
jbtnAdd.setEnabled(false);
new ShiftSwapForm("Create New Shift Swap", jbtnAdd);
}
JFrame:
Field:
private JButton launch;
Constructor:
public ShiftSwapForm(String title, JButton launch) {
super(title);
this.launch = launch;
}
public void actionPerformed(ActionEvent ae) {
dispose();
launch.setEnabled(true);
}
OK. I have no idea what I'm doing wrong. The button in the applet gets disabled but the frame does not appear. This works in a very simple example but not in my application. I must be overlooking something very simple.
Thank you in advance for any help.
Clinton
"The important thing is not to stop questioning." - Albert Einstein