Home | Schulung | Beratung | Referenzen | Veröffentlichungen | Jobs | Sitemap | Kontakt

Erste Folie | Zurück | Weiter | Letzte FolieGrafikversion | Inhalt | Home

Beispiel mit JNLP API



import javax.jnlp.*;
...
FileOpenService fos;
try {
fos=(FileOpenService)ServiceManager.lookup("javax.jnlp.FileOpenService");
} catch (UnavailableServiceException e)
{ fos = null; }
if (fos != null) {
try {
// ask user to select a file through this service
FileContents fc = fos.openFileDialog(null, null);
// as user to select multiple files through this service
FileContents [] fcs = fos.openMultiFileDialog(null, null);
} catch (Exception e)
{ e.printStackTrace(); }
}