aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to implement a Selection area / marquee? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to implement a Selection area / marquee?" Watch "How to implement a Selection area / marquee?" New topic
Author

How to implement a Selection area / marquee?

Toby Weston
Greenhorn

Joined: Dec 20, 2006
Posts: 6
Hi Folks,

Having trouble implementing something that when you click and drag on a window a dashed line will appear, allowing you to select whats within that region. A similar tool in Eclipse's visual editor palette is called a Marquee (but I gather this word can also be used for a Ticker).

I've had some success drawing a rectangle to the screen capturing mouse events but I can't get it to display correctly (specifically, clearing the screen).

Ive got something that looks like this.
);

Any tips or suggestions on the approach. It would be nice to create a re-usable component. I'm not too worried about the actual section of things within that region (I can probably cope with that) so its more the graphical part.

Any help appreciated.

Thanks,
Toby
Toby Weston
Greenhorn

Joined: Dec 20, 2006
Posts: 6
Sorry, should have stated this is using SWT...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to implement a Selection area / marquee?
 
Similar Threads
[SWT] Creating a Tracker stops MouseUp
Really need help in this program
How to DnD JLabels in left Jpanel to right and vice versa??
How to shrink/grow lines
Why Cannot DnD again after I setToolTipText in JPanel??