harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Krivenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1699) [classlib][swing] NPE in BasicRootPaneUI caused by the JFileChooser.
Date Fri, 22 Dec 2006 11:56:23 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1699?page=comments#action_12460445 ] 
            
Sergey Krivenko commented on HARMONY-1699:
------------------------------------------

I can not reproduce the bug on my Windows XP. 

> [classlib][swing] NPE in BasicRootPaneUI caused by the JFileChooser.
> --------------------------------------------------------------------
>
>                 Key: HARMONY-1699
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1699
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP
>            Reporter: Oleg Khaschansky
>            Priority: Minor
>
> To reproduce do the following steps:
> 1. Run the testcase (listed below).
> 2. In the FileChooser select  the "File Name" text field.
> 3. Type in the name of any existing directory.
> 4. Press "Enter" key.
> As a result the NPE is thrown and user events are no more processed by the frame when
FileChooser dialog is closed. On RI this works fine, no exceptions.
> -------------------------------------------------------------------------
> The testcase:
> import javax.swing.*;
> public class Test {
>    public static void main(String[] args) {
>        JFrame f = new JFrame();
>        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>        f.setSize(100, 100);
>        f.setVisible(true);
>        JButton hello = new JButton("Hello");
>        f.getContentPane().add(hello);
>        f.getRootPane().setDefaultButton(hello);
>        new JFileChooser().showOpenDialog(f);
>     }
> }
> -------------------------------------------------------------------------
> Harmony output:
> java.lang.reflect.InvocationTargetException
> 	at java.awt.EventQueue.invokeAndWait(EventQueue.java:74)
> 	at java.awt.Toolkit.unsafeInvokeAndWait(Toolkit.java:48)
> 	at java.awt.Dialog.showImpl(Dialog.java:256)
> 	at java.awt.Dialog.show(Dialog.java:246)
> 	at java.awt.Component.show(Component.java:3239)
> 	at java.awt.Component.setVisible(Component.java:321)
> 	at javax.swing.JFileChooser.showDialog(JFileChooser.java:51)
> 	at javax.swing.JFileChooser.showOpenDialog(JFileChooser.java:58)
> 	at ttt.main(ttt.java:14)
> Caused by: java.lang.NullPointerException
> 	at javax.swing.plaf.basic.BasicRootPaneUI$DefaultButtonAction.isEnabled(BasicRootPaneUI.java:70)
> 	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:455)
> 	at javax.swing.JComponent.processKeyBinding(JComponent.java:588)
> 	at javax.swing.JComponent.processKeyBindings(JComponent.java:783)
> 	at javax.swing.JComponent.processKeyEvent(JComponent.java:765)
> 	at java.awt.Component.processEvent(Component.java:3825)
> 	at java.awt.Container.processEvent(Container.java:1281)
> 	at java.awt.Component.dispatchEvent(Component.java:3718)
> 	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:312)
> 	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:379)
> 	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:96)
> 	at java.awt.Component.dispatchEvent(Component.java:3687)
> 	at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:139)
> 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
> 	at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:69)
> 	at java.awt.ModalContext.runModalLoop(ModalContext.java:43)
> 	at java.awt.Dialog$DialogModalContext.runModalLoop(Dialog.java:44)
> 	at java.awt.Dialog.showModal(Dialog.java:369)
> 	at java.awt.Dialog.access$000(Dialog.java:34)
> 	at java.awt.Dialog$1.run(Dialog.java:258)
> 	at java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:88)
> 	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:77)
> 	at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:131)
> 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
> 	at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:69)
> 	at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message