final JDesktopPane desktopPane = jmeDesktop.getJDesktop();
// desktopPane.removeAll();
final JInternalFrame internalFrame = new TransparentInternalFrame();
final ChatPanel pan = new ChatPanel();
pan.validate();
internalFrame.add(pan);
internalFrame.setVisible(true);
internalFrame.setSize(new java.awt.Dimension(320, 250));
internalFrame.pack();
internalFrame.setLocation(0,desktopPane.getHeight()-internalFrame.getHeight());
desktopPane.add(internalFrame);
// minimize on mouse out maximize on mouse in
MinMaxListener mima = new MinMaxListener(internalFrame, "Chatwindow", pan, desktopPane);
pan.addMouseListener(mima);
wireInputSwitch(new ArrayList<BaseUsable>()/*must pass empty otherwise not overriden*/, pan);
desktopPane.repaint();
desktopPane.revalidate();