harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2030) [classlib][awt] JComponent doesn't send 'removed' event
Date Wed, 01 Nov 2006 09:21:57 GMT
[classlib][awt] 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

        

Mime
View raw message