desktopPane.removeAll();
final JInternalFrame internalFrame = new TransparentInternalFrame();
//internalFrame.setLocation(desktopPane.getWidth()/2-100, desktopPane.getHeight()/2-90);
final AdminTeleportJPanel pan = new AdminTeleportJPanel();
pan.validate();
internalFrame.add(pan);
internalFrame.setSize(new java.awt.Dimension(240, 110));
internalFrame.setVisible(true);
internalFrame.pack();
internalFrame.setLocation(0,0);
desktopPane.add(internalFrame);
wireInputSwitch(new ArrayList<BaseUsable>()/*must pass empty otherwise not overriden*/, pan);
pan.addToTestAreaActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// this gets executed in swing thread
// alter swing components only in swing thread!
Singleton.get().getCharController().teleportToTestArea();
}
});
pan.addFromTestAreaActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// this gets executed in swing thread
// alter swing components only in swing thread!
Singleton.get().getCharController().teleportFromTestArea();
}