SlickDesktop JPanel

Hey guys, I am using SlickDesktop for my game, and I was wondering on how I can make a draggable JPanel with no window border. Please help out, all I have on it is a JTextField, a JButton, and a JLabel (for background image).

Using a dragable JPanel is probably not the best way to do this. Either use a JFrame with setUndecorate(true), or a http://download.oracle.com/javase/6/docs/api/javax/swing/JWindow.html.

As far as dragging the thing around, you will have to listen for mouse pressed/released events on the window. Don’t know if it will still receive mousemoved events for the dragging though.

You’re probably gonna have to listen to mouseDragged events in the MouseMotionListener interface. Then just set the X and Y of JFrame/JWindow.