public void actionPerformed(ActionEvent event) { if (event.getSource().equals(launchBrowser)) { Configuration config = Configuration.getInstance(); String ip = Util.getIPAddress(); String protocol = "http" + (config.ssl ? "s" : ""); String url = protocol + "://" + ip + ":" + config.port; Util.openURL(url); } else if (event.getSource().equals(stop)) { Util.shutdown(); running = Util.isRunning(); setStatus(); } else if (event.getSource().equals(start)) { clearLogsDir(); run(); launchBrowser.requestFocusInWindow(); } }
public void setFocusOnStart() { start.requestFocusInWindow(); }