
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

























Client Computer JNLP Client URL JNLP Server With resource files Web Resources JVM Resources Java Application Native Rsources
Container content = frame.getContentPane(); content.add(label, BorderLayout.CENTER); String message = "missing"; BufferedReader reader = null; try { Socket socket = new Socket("time.nist.gov", 13); InputStream is = socket.getInputStream(); InputStreamReader isr = new InputStreamReader(is); reader = new BufferedReader(isr); reader.readLine(); // skip blank line message = reader.readLine(); } catch (MalformedURLException e) { System.err.println("Malformed: " + e); } catch (IOException e) { System.err.println("I/O Exception: " + e);
} finally { if (reader != null) { try { reader.close(); } catch (IOException ignored) { } } } label.setText(message); frame.pack(); frame.show(); } }