[5189] in java-interest

home help back first fref pref prev next nref lref last post

FileDialog bugs!

daemon@ATHENA.MIT.EDU (Glenn Twiggs)
Wed Jan 31 18:54:53 1996

Date: Wed, 31 Jan 96 14:03:52 -0800
From: Glenn Twiggs <getsmart@bga.com>
To: java-interest@java.sun.com

I have run in to two very frustrating problems using object FileDialog in 
JDK beta2 on Win95 :

public class MyWin extends Frame {
  ...
  public boolean handleEvent(Event evt) {
    ...
    // File|Open menu item is selected
    FileDialog fd = new FileDialog(this, "Open File");
    fd.open();
    String filename = fd.getFile();
    if (filename != null)
      System.out.println(fd.getFile());
    ...
  }
}

1) In an application or applet the parent window (MyWin in the above 
example) of the FileDialog does not get refreshed when the FileDialog is 
moved or closed.  An image of the FileDialog remains on the canvas, and 
as an added bonus, the controls on the canvas stop functioning.  This 
error can also be seen by viewing:
   http://java.sun.com/tutorial/ui/overview/components.html
and clicking the big button.

2) The FileDialog does not return the file the user selected. 
fd.getFile() returns <null> when called after the window closes (see code 
snippet sabove).

-- 
Glenn E Twiggs
getsmart@bga.com



-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post