JWindow

Hello ppl,

I just made a simple JWindow and made it visible, but i cant get it to move, its just fixed in one place. How do u make the window movable ?

public Gui(JWindow aWindow)

{

this.window = aWindow;

setSize(WIDTH,HEIGHT);

screenSize = Toolkit.getDefaultToolkit().getScreenSize();

setLocation((screenSize.width-WIDTH)*2/3,(screenSize.height-HEIGHT)*2/3);

try

{

UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());

}

catch(Exception e){}

Container container = getContentPane();

container.setLayout(null);

background = Toolkit.getDefaultToolkit().getImage(getClass().getClassLoader().getResource("Images/background.gif"));

setVisible(true);

}

[1127 byte] By [--stallion--a] at [2007-11-27 2:11:35]
# 1
You can use JFrame or JDialog instead.-OR- if you really want a movable JWindow, tell me and I'll repost my draggable class
tjacobs01a at 2007-7-12 2:04:54 > top of Java-index,Desktop,Core GUI APIs...