Methods Summary |
---|
private void | askForPage(java.net.Socket webServer)
BufferedWriter request;
request = new BufferedWriter(new OutputStreamWriter(webServer.getOutputStream()));
request.write("GET / HTTP/1.0\n\n");
request.flush();
|
private javax.swing.JComponent | buildButtonBar()
JPanel topPanel = new JPanel(new GridLayout(1, 2));
_url = new JTextField(40);
_fetchButton = new ActionButton(new FetchURL());
topPanel.add(_url);
topPanel.add(_fetchButton);
return topPanel;
|
protected void | buildGUI()
JPanel newContentPane = new JPanel(new BorderLayout());
newContentPane.add(buildButtonBar(), BorderLayout.SOUTH);
newContentPane.add(buildMainPanel(), BorderLayout.CENTER);
setContentPane(newContentPane);
setSize(250, 300);
|
private javax.swing.JComponent | buildMainPanel()
_displayArea = new JTextArea();
_displayArea.setLineWrap(true);
JScrollPane scrollPane = new JScrollPane(_displayArea);
scrollPane.setBorder(new EtchedBorder());
return scrollPane;
|
private void | receivePage(java.net.Socket webServer)
BufferedReader webPage = null;
webPage = new BufferedReader(new InputStreamReader(webServer.getInputStream()));
String nextLine;
while (null != (nextLine = webPage.readLine())) {
_displayArea.append(nextLine + "\n");
}
return;
|