rendered paste bodypublic class MyApplet extends JApplet {
public void init() {
super.init();
JButton btnLaunch = new JButton("Launch");
btnLaunch.addActionListener(new ActionListener() {
@Override public void actionPerformed(ActionEvent e) {
new FakeMainWindow(getParameter("server"));
}
});
getContentPane().add(btnLaunch);
}
}
---
public class FakeMainWindow extends JFrame {
private static final long serialVersionUID = -2398748084588857421L;
public FakeMainWindow(String x) {
super("test: " + x);
setVisible(true);
}
}