commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] [bug #13302] swing: ActionEvent not sent to JButton


From: Timo Lindfors
Subject: [commit-cp] [bug #13302] swing: ActionEvent not sent to JButton
Date: Sun, 5 Jun 2005 11:13:42 +0000
User-agent: Elinks

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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]