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();