desktopPane.removeAll();
final JInternalFrame internalFrame = new TransparentInternalFrame();
internalFrame.setLocation(desktopPane.getWidth()/2-200, desktopPane.getHeight()/2-150);
final GameServerJPanel pan = new GameServerJPanel(serverInfos);
internalFrame.add(pan);
internalFrame.setVisible(true);
internalFrame.setSize(new java.awt.Dimension(400, 300));
internalFrame.pack();
desktopPane.add(internalFrame);
wireInputSwitch(new ArrayList<BaseUsable>()/*must pass empty otherwise not overriden*/, pan);
// standard swing action:
pan.addCancelActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// this gets executed in swing thread
// alter swing components only in swing thread!
internalFrame.setVisible(false);
desktopPane.remove(internalFrame);
}
});
pan.addSelectActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// this gets executed in swing thread
// alter swing components ony in swing thread!
internalFrame.setVisible(false);
desktopPane.remove(internalFrame);