commit-classpath
[Top][All Lists]
Advanced

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

[commit-cp] [bug #13298] swing: ClassCastException: javax/swing/JTextAre


From: Timo Lindfors
Subject: [commit-cp] [bug #13298] swing: ClassCastException: javax/swing/JTextArea
Date: Sun, 5 Jun 2005 00:23:36 +0000
User-agent: Elinks

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13298>

                 Summary: swing: ClassCastException: javax/swing/JTextArea
                 Project: classpath
            Submitted by: lindi
            Submitted on: Sun 06/05/05 at 00:23
                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. Hit enter on the textarea.

Expected results:
1. A window shows up.
2. An empty line is added to the textarea

Actual results:
1. A window shows up
2. An empty line is added to the textarea but the program also throws the
following exception:
Exception during event dispatch:
java.lang.ClassCastException: javax/swing/JTextArea
   at javax.swing.JTextField$1.actionPerformed (JTextField.java:101)
   at javax.swing.SwingUtilities.notifyAction (SwingUtilities.java:1092)
   at javax.swing.JComponent.processKeyBinding (JComponent.java:1824)
   at javax.swing.JComponent.processKeyEvent (JComponent.java:1797)
   at java.awt.Component.processEvent (Component.java:2922)
   at java.awt.Container.processEvent (Container.java:841)
   at java.awt.Component.dispatchEventImpl (Component.java:4779)
   at java.awt.Container.dispatchEventImpl (Container.java:1539)
   at java.awt.Component.dispatchEvent (Component.java:2284)
   at java.awt.KeyboardFocusManager.redispatchEvent
(KeyboardFocusManager.java:1108)
   at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent
(DefaultKeyboardFocusManager.java:274)
   at java.awt.DefaultKeyboardFocusManager.dispatchEvent
(DefaultKeyboardFocusManager.java:247)
   at java.awt.EventDispatchThread.run (EventDispatchThread.java:74)

Testcase:
import javax.swing.*;
import java.awt.event.*;
public class textarea extends JFrame implements ActionListener {
        public static void main(String[] args) {
                (new textarea()).show();
        }
        public textarea() {
                JTextField field = new JTextField();
                field.addActionListener(this);
                JTextArea area = new JTextArea(10, 40);
                this.setContentPane(area);
                this.pack();
        }
        public void actionPerformed(ActionEvent e) {
        }
}







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13298>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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