Java Reference
In-Depth Information
L ISTING 11.10 Continued
file = fs.openFileDialog(“mydir”, suffixes);
} catch (Exception e) {
System.out.println(“openFile: “+e);
}
}
}
public static void main(String[] args) {
AnApplication anApplication1 = new AnApplication();
}
}
Figure 11.2 presents a screenshot from the test application running.
Production direc-
tive said to crop
this. Okay?
F IGURE 11.2
A screenshot from the test application.
In Figure 11.2, we see several different things:
• Locale-specific data, both in the title and in the bottom label. If you try to run the pro-
gram on a computer with a Locale other than Italian, you'll see English text instead
(provided as default; see following).
•Icons loaded and icons not found in the JAR file. The JFrame icon hasn't been found so
the Utilities class provides a default one without firing any exception.
• The JNLPLabel at work, showing the pointed URL as a tooltip (the hand cursor is not
shown).
•Clicking the Paste button will activate the Clipboard, which will prompt for authorization
because the application is not signed. The button with the open file icon, instead, will
prompt to open a file from the local file system.
Search WWH ::




Custom Search