[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/22974] swing: ActionEvent not sent to JButton
From: |
gcc-bugzilla at gcc dot gnu dot org |
Subject: |
[Bug classpath/22974] swing: ActionEvent not sent to JButton |
Date: |
16 Oct 2005 01:27:49 -0000 |
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");
}
}
------- Comment #1 from from-classpath at savannah dot gnu dot org 2005-06-05
16:21 -------
Just noticed that "actionPerformed" is printed if I hit space bar.
------- Comment #2 from from-classpath at savannah dot gnu dot org 2005-06-06
11:42 -------
I committed a fix. Please retest.
------- Comment #3 from from-classpath at savannah dot gnu dot org 2005-06-06
13:48 -------
Seems to work now, thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22974
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/22974] swing: ActionEvent not sent to JButton,
gcc-bugzilla at gcc dot gnu dot org <=