You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Denis Kishenko (JIRA)" <ji...@apache.org> on 2006/11/28 10:53:23 UTC

[jira] Updated: (HARMONY-2030) [classlib][swing] JComponent doesn't send 'removed' event

     [ http://issues.apache.org/jira/browse/HARMONY-2030?page=all ]

Denis Kishenko updated HARMONY-2030:
------------------------------------

    Summary: [classlib][swing] JComponent doesn't send 'removed' event  (was: [classlib][awt] JComponent doesn't send 'removed' event)

> [classlib][swing] JComponent doesn't send 'removed' event
> ---------------------------------------------------------
>
>                 Key: HARMONY-2030
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2030
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>
> When JComponent becomes invisible, it doesn't send 'removed' event to its ancestorListeners 
> ========== Test ==========
> import javax.swing.*;
> import javax.swing.event.*;
> public class Test {
>    public static void main(String[] string) throws Exception {
>             AncestorListenerImpl al = new AncestorListenerImpl();
>             JWindow window = new JWindow();
>             JComponent jc = new JComponent() {
>             };
>             window.getContentPane().add(jc);
>             window.setVisible(true);
>             jc.setVisible(true);
>             jc.addAncestorListener(al);
>             jc.setVisible(false);
>             Thread.sleep(1000);
>             System.out.println("finish");
>             System.exit(0);
>    }
> }
> class AncestorListenerImpl implements AncestorListener {
>     public void ancestorAdded(AncestorEvent arg0) {
>         System.err.println("added");
>     }
>     public void ancestorMoved(AncestorEvent arg0) {
>        System.err.println("moved");
>     }
>     public void ancestorRemoved(AncestorEvent arg0) {
>         System.err.println("removed");
>     }
> }
> ======== RI ===========
> removed
> finish
> =========== Harmony ========
> java.lang.RuntimeException: Not owner can't unlock resource.
> 	at org.apache.harmony.awt.wtk.Synchronizer.unlock(Synchronizer.java:115)
> 	at java.awt.Toolkit.unlockAWT(Toolkit.java:391)
> 	at java.awt.Component.show(Component.java:3095)
> 	at java.awt.Component.show(Component.java:3102)
> 	at java.awt.Component.setVisible(Component.java:3075)

-- 
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