Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

rolling a component allover JDesktopPane  RSS feed

 
basha khan
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai everybody,
i want to roll(drag) a component allover jDesktopPane.
i have achieved this by calling component's setBounds() method consistantly from mouseDragged method.
the dragging is actually takes place.but the problom is 'flickering'.string 'flickering' occurs while dragging the component.how can i resolve this 'flickering'?.
i think that using dnd can solve this problom.how can implement dnd if both drag source and drop target is same?.or how can i use dnd for solving the above mentioned problom?.
anyone knows plz ..
wishing u a happy day ..
basha
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"basha" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

Hmmmm.... maybe you should explain more of what you are trying to do...

Why are you using a JDesktopPane? Are you going to be using JInternalFrames?

You probably don't need to use DnD functionality if the component you are moving always stays in the same container... DnD is for moving things between containers.

Here's a short example that may help you out....



Thanks! and welcome to the JavaRanch!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!