JDK-4028889 : FileDialog doesn't get Window{Activated,Deactivated,Closing} events
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1,1.3.0,8
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic,windows_nt
  • CPU: generic,x86
  • Submitted: 1997-01-29
  • Updated: 2021-07-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
orig synopsis:  "WindowEvents not delivered to FileDialog"

Name: mc57594			Date: 01/29/97


import java.awt.*;
import java.awt.event.*;


//Show's bug in FileDialog implementation of Dialog, or something like
that.
//Can't get WindowEvents to be delivered to a WindowListener w/the
FileDialog,
//but events seem to be delivered no problem to a basic Dialog.
//from: Scott McMullan (###@###.###)
public class DialogTest extends Frame {

    FileDialog fd;
    Dialog d;

    public DialogTest() {
        super("Dialog Test");
        show();

        //NO WindowEvents get delivered to fd's WindowListener
        fd = new FileDialog(this, "Test FileDialog");
        fd.addWindowListener(new FdListener());
        fd.show();

        //WindowEvents DO get delivered to d's WindowListener (eg.,
close the dialog)
        d = new Dialog(this, "Test Dialog");
        d.addWindowListener(new FdListener());
        d.add(new Button("Fill Up Space Button"));
        d.resize(100, 100);
        d.show();
    }


    public static void main(String argv[]) {
        DialogTest dt = new DialogTest();
    }
}


//class FdListener extends WindowAdapter {    <-- this doesn't work
either...
class FdListener implements WindowListener {

    public FdListener() {
        System.out.println("new FdListener being created...");
    }

    public void windowActivated(WindowEvent we) {
        System.out.println("windowActivated()...");
    }

    public void windowClosing(WindowEvent we) {
        System.out.println("windowClosing()...");
    }

    public void windowClosed(WindowEvent we) {
        System.out.println("windowClosed()...");
    }

    public void windowIconified(WindowEvent we) {
        System.out.println("windowIconified()...");
    }

    public void windowDeiconified(WindowEvent we) {
        System.out.println("windowDeiconified()...");
    }

    public void windowDeactivated(WindowEvent we) {
        System.out.println("windowDeactivated()...");
    }

    public void windowOpened(WindowEvent we) {
        System.out.println("windowOpened()...");
    }

}

Comments
Remove test list because failures caused by configuration issue. Verified manually
02-12-2013

EVALUATION The bug is reproducible with Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b52) with MToolkit and WToolkit. Expect I could see windowOpened notification.
21-09-2005

EVALUATION Name: rrT76497 Date: 05/13/98 Bug reproducible - Solaris2.5/Intel, Win95, WinNT ====================================================================== Name: rrT76497 Date: 05/29/98 Bug reproducible - Solaris2.5/Intel, Solaris2.6/SPARC, Win95, WinNT On Solaris 2.5/Intel, Solaris 2.6/SPARC Bug reproduced, WindowEvents not delivered to FileDialog Tested with JDK1.1.6N, JDK1.2beta3-N On Win95/WinNT Bug reproduced, WindowEvents not delivered to FileDialog Tested with JDK1.1.5, JDK1.2beta3-N ====================================================================== 3/26/2000 kevin.ryan@eng -- still true as of kestrel-rc2 (1.3.0rc2-Y) on both win32 and Solaris. Name: dsR10078 Date: 07/04/2001 Reproducible with merlin b70 on Solaris and WinNT. ###@###.### 2001-07-02 ====================================================================== Name: rpR10076 Date: 11/15/2001 commit to hopper and tiger ======================================================================
17-09-2004

WORK AROUND Name: mc57594 Date: 01/29/97 unknown ======================================================================
17-09-2004