URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13302>
Summary: swing: ActionEvent not sent to JButton
Project: classpath
Submitted by: lindi
Submitted on: Sun 06/05/05 at 11:13
Category: classpath
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Platform Version: None
_______________________________________________________
Details:
Steps to reproduce:
1. Compile and run the attached testcase.
2. Click the button.
Expected results:
1. A window with "button1" shows up.
2. "actionPerformed" is printed to stdout.
Actual results:
1. A window with "button1" shows up.
2. Nothing is printed to stdout.
Testcase:
import javax.swing.*;
import java.awt.event.*;
public class buttonlistener extends JFrame implements ActionListener {
public static void main(String[] args) {
(new buttonlistener()).show();
}
public buttonlistener() {
JButton button = new JButton("button1");
button.addActionListener(this);
this.setContentPane(button);
this.pack();
}
public void actionPerformed(ActionEvent e) {
System.out.println("actionPerformed");
}
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13302>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Commit-classpath mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-classpath