bug-classpath
[Top][All Lists]
Advanced

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

[Bug classpath/29790] New: WindowEvents are not dispatched on JFrame


From: volker dot berlin at goebel-clan dot de
Subject: [Bug classpath/29790] New: WindowEvents are not dispatched on JFrame
Date: 9 Nov 2006 22:19:47 -0000

If I run the small test below then I receive with the Sun VM the follow output
and the JFrame is closed. With GNU classpath there are no output and the JFrame
is not closed. I have not tested if this is also a problem of other Window
classes. The WindowEvents will also not dispatched if I add a WindowListener.

Sun output
============
java.awt.event.WindowEvent[WINDOW_ACTIVATED,opposite=null,oldState=0,newState=0]
on frame0
java.awt.event.WindowEvent[WINDOW_OPENED,opposite=null,oldState=0,newState=0]
on frame0
java.awt.event.WindowEvent[WINDOW_CLOSING,opposite=null,oldState=0,newState=0]
on frame0
java.awt.event.WindowEvent[WINDOW_DEACTIVATED,opposite=null,oldState=0,newState=0]
on frame0


Test program
==============
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class Test{

        public static void main(String[] args){
                final MyFrame jframe = new MyFrame();
                jframe.pack();
                jframe.show();
        jframe.dispatchEvent(new WindowEvent(jframe,
WindowEvent.WINDOW_CLOSING));
        }

    static class MyFrame extends JFrame{

        protected void processEvent(AWTEvent evt){
            System.out.println( evt );
            super.processEvent( evt );
        }
    }
}


-- 
           Summary: WindowEvents are not dispatched on JFrame
           Product: classpath
           Version: 0.92
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: volker dot berlin at goebel-clan dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29790





reply via email to

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