[5950] in java-interest

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

RE: Help: FileDialog ?

daemon@ATHENA.MIT.EDU (Per Danvind)
Tue Mar 5 20:47:35 1996

From: Per Danvind <perry@interbizz.se>
To: "'csy'" <csy@cypress.com>,
        "java-interest@java.Eng.Sun.COM"
	 <java-interest@java.Eng.Sun.COM>
Date: Tue, 5 Mar 1996 08:18:32 +-100

Hi,

When you have shown the FileDialog, call getFile(). It will return
the name of the file that the user selected, or if the user pressed
Cancel, it will return null.

Doing something like:

String fileName = fileDialogObject.getFile();
if(fileName!=null) {
  // The user selected a file.
} else {
  // The user pressed cancel.
}

--
Per

----------
From: 	csy[SMTP:csy@cypress.com]
Sent: 	 den 2 mars 1996 00:21
To: 	java-interest@java.Eng.Sun.COM
Subject: 	Help: FileDialog  ?

java programmers;

	I'm wondering is there anyone who has experience using the FileDialog
	class in the java.awt.  I have a couple of questions about it:

	1) I heard some rumors about restrictions of using FileDialog on an applet,
	   what are they ?

	2) I can make a FileDialog to show when a user chooses the "Open" menu item,
	   but, how can I associate actions to the events on FileDialog, like,
	   user selecting a file to Open, or hit the Cancel button ?

		- I try to inherit the FileDialog class, and override the
		action() or handleEvent() methods, but doesn't seem to work.

		- anyone can provide me some sample code using FileDialog ?
		I'd appreciate that.

	Thank you in advance for your help.

	- Steve

+---------------------------------------------------------------+
| Steve Yang                    | 2401 E. 86th Street           |
| IS Software Developer/DBA     | Bloomington, MN 55425         |
| Cypress Semiconductor, Inc.   | Voice: (612) 851-5203         |
| csy@cypress.com               | Fax:   (612) 851-5199         |
| WWW: http://www.cypress.com   |                               |
+---------------------------------------------------------------+

-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.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