Skip to main content
gamedev.net
🔒 Locked

[java] GUI - Window Dragging

Started by snisarenko Sep 25, 2005 at 11:44 PM 2 replies 1.4k views
Original Post
snisarenko
snisarenko
How Do you handle or control dragging. I want to create a "Window" that wont be able to be dragged outside of its child window. I checked out WindowListeners but non of them have any sort of drag Event. Is there a class in java that can handle dragging for a "Component" ?
Vyper_uk
Vyper_uk
Doesn't answer your question about window listeners but it solves your problem, look into the JInternalFrame it seems to do what you need :)
Son of Cain
Son of Cain
Vyper is right, dude - perhaps you're searching for a JInternalFrame. In that case, see the JDesktopPane documentation as well.

If by some (weird) reason you dont want to use JInternalFrames, you'll have to keep a reference to the parent window in the child window, and use a listener to any movement in the child window. I don't know for sure if such event is available, though.

Son Of Cain
a.k.a javabeats at yahoo.ca

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.