desktopPane.removeAll();
final JInternalFrame internalFrame = new TransparentInternalFrame();
internalFrame.setLocation(desktopPane.getWidth()/2-100, desktopPane.getHeight()/2-90);
final RevivePanel pan = new RevivePanel();
pan.setButtonOptions(options, itemtext);
internalFrame.add(pan, 0);
jmeDesktop.setModalComponent(internalFrame);
internalFrame.setVisible(true);
internalFrame.setSize(new java.awt.Dimension(200, 180));
internalFrame.pack();
desktopPane.add(internalFrame);
wireInputSwitch(new ArrayList<BaseUsable>()/*must pass empty otherwise not overriden*/, pan);
// standard swing action:
pan.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// this gets executed in swing thread
// alter swing components only in swing thread!
jmeDesktop.setModalComponent(null);
internalFrame.setVisible(false);