* @return the initialized dialog for action wireing
*/
//TODO store username in the config and preenter it for the user on next display
public TransparentLoginPanel displayUserPasswordJPanel(){
final JDesktopPane desktopPane = jmeDesktop.getJDesktop();
desktopPane.removeAll();
// final JInternalFrame internalFrame = new TransparentInternalFrame();
// internalFrame.setLocation(500, 200);
final TransparentLoginPanel pan = new TransparentLoginPanel();
// internalFrame.add(pan);
//FIXME if pan is used it is the one to be removed on close
//how do we do dragging of window?
pan.setTransparency(0.8f);
// internalFrame.add(pan);
// internalFrame.setSize(new java.awt.Dimension(200, 140));
// internalFrame.pack();
// internalFrame.setVisible(true);
// desktopPane.add(internalFrame);
//interresting feature too, no borders, just the panel, works too and looks ok without borders
pan.setLocation(jmeDesktop.getJDesktop().getWidth()/2+50, jmeDesktop.getJDesktop().getHeight()/2-100);
//commented out, as we have now a check going on if the input is valid
// //these are the actions for the gui, thy do not define what should be executed on login/cancel
// // 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!
// pan.setVisible(false);
// desktopPane.remove(pan);
// }
// });
// pan.addLoginActionListener(new ActionListener() {
// public void actionPerformed(ActionEvent e) {
// // this gets executed in swing thread
// // alter swing components ony in swing thread!
//
// pan.setVisible(false);
// desktopPane.remove(pan);
// }
// });
wireInputSwitch(new ArrayList<BaseUsable>()/*must pass empty otherwise not overriden*/, pan);
pan.setVisible(true);
desktopPane.add(pan);
return pan;
}