Methods Summary |
---|
public void | actionPerformed(java.awt.event.ActionEvent evt)
try {
URL u = new URL(theURL.getText());
InputStream in = u.openStream();
OutputStream out = theDisplay.getOutputStream();
StreamCopier.copy(in, out);
in.close();
out.close();
}
catch (MalformedURLException ex) {
theDisplay.setText("Invalid URL");
}
catch (IOException ex) {
theDisplay.setText("Invalid URL");
}
|
public void | init()
this.add("North", theURL);
this.add("Center", theDisplay);
Panel south = new Panel();
south.add(loadButton);
this.add("South", south);
theURL.addActionListener(this);
loadButton.addActionListener(this);
this.addWindowListener(this);
this.setLocation(50, 50);
this.pack();
this.show();
|
public static void | main(java.lang.String[] args)
URLViewer me = new URLViewer();
me.init();
|
public void | windowActivated(java.awt.event.WindowEvent e)
|
public void | windowClosed(java.awt.event.WindowEvent e)
|
public void | windowClosing(java.awt.event.WindowEvent e)
this.setVisible(false);
this.dispose();
|
public void | windowDeactivated(java.awt.event.WindowEvent e)
|
public void | windowDeiconified(java.awt.event.WindowEvent e)
|
public void | windowIconified(java.awt.event.WindowEvent e)
|
public void | windowOpened(java.awt.event.WindowEvent e)
|