• Post Reply Bookmark Topic Watch Topic
  • New Topic

Move JInternalFrame by dragging the borders  RSS feed

 
Max Wood
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI
I disable JInternalFrame titlebar and resizable functionality, now i want users can move internal frame by dragging the borders, any way to do this?
 
Rob Spoor
Sheriff
Posts: 21095
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out MouseListener and MouseMotionListener, which have been combined in MouseInputListener which extends both. Especially the mouseDragged method will come in handy.
 
Max Wood
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for replay, but how i can add MouseListener to Border?
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"dip war " please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> I disable JInternalFrame titlebar and resizable functionality, now i want users can move internal frame by dragging the borders, any way to do this?

all that is going to do is confuse your users - dragging borders is for resizing.

how have you disabled the titlebar?
mouseListeners generally (often?) work when the component is disabled,
so that is where you should be adding your move code
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!