else
((JFrame) appletFrame).pack();
((JFrame) appletFrame).show();
pluginLoader.broadcast(new SocketRequest(host, Integer.parseInt(port)));
pluginLoader.broadcast(new ReturnFocusRequest());
close.setLabel(startText != null ? stopText : "Disconnect");
} else
close.setLabel(startText != null ? startText : "Connect");
close.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
if (((JFrame) appletFrame).isVisible()) {
pluginLoader.broadcast(new SocketRequest());
((JFrame) appletFrame).setVisible(false);
close.setLabel(startText != null ? startText : "Connect");
} else {
if (frameTitle == null)
((JFrame) appletFrame)
.setTitle("jta: " + host + (port.equals("23")?"":" " + port));
if ((new Boolean(options.getProperty("Applet.detach.fullscreen"))
.booleanValue()))
((JFrame) appletFrame)
.setSize(appletFrame.getContentPane().getToolkit().getScreenSize());
else
((JFrame) appletFrame).pack();
((JFrame) appletFrame).show();
if (port == null || port.length() <= 0)
port = "23";
getAppletContext().showStatus("Trying " + host + " " + port + " ...");
pluginLoader.broadcast(new SocketRequest(host,
Integer.parseInt(port)));
pluginLoader.broadcast(new ReturnFocusRequest());
close.setLabel(stopText != null ? stopText : "Disconnect");
}
}
});