# When does an Applet display a warning dialogue?

Allin, Jonathan (Jonathan.Allin@uk.origin-it.com)
Wed, 6 Jan 1999 09:41:45 -0000

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Allin, Jonathan: "RE: When does an Applet display a warning dialogue?"
- Previous message: Leslie Myers: "URGENT REPLY NEEDED!"

Chaps,

I'm running Java 2 on Windows 95.

When does an Applet display a Warning dialogue?

The following Applet code causes a warning dialogue to pop up:

Properties props = null;
Frame f = new Frame("To print");
f.setSize(200, 300);
f.show();
PrintJob job = Toolkit.getDefaultToolkit().getPrintJob(f, "Print1",
props);

The dialogue asks the user's permission to print - which is exactly what
I want.

However the following generates an exception:

BufferedWriter bw = new BufferedWriter(new FileWriter("Foobar.txt"));
bw.write("Good morning Sun\n");

How can I find out which calls will generate exceptions, and which will
raise a warning dialogue?

Is it possible to change this behaviour?

Many thanks in anticipation,

--Jonathan Allin

>Jonathan Allin, DSc, MBA, CEng MIEE
>Consultant, Java initiative
>Origin UK Limited
>323 The Science Park
>Cambridge
>CB4 0WG
>UK
>
>Direct line: +44 (0)1223 394569
>Fax: +44 (0)1223 394436
>EMail: jonathan.allin@uk.origin-it.com
URL: http://www.origin-it.com

- Next message: Allin, Jonathan: "RE: When does an Applet display a warning dialogue?"
- Previous message: Leslie Myers: "URGENT REPLY NEEDED!"