Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Need advice on implementing drag/drop rectangles in applet

Thread Tools

Need advice on implementing drag/drop rectangles in applet

Ajay Patil
Posts: n/a

I need the advice on how to implement drag/drop rectangles in an applet.

I can think of two approaches.
1. Use Java 2D and handle mouse events in the panel.
2. Draw each rectangle as a AWT/Swing component and let it handle its own
mouse events.

Can someone advice me which of the above approaches is better.

In the second approach, I was thinking that if I use a layout manager like
GridBagLayout, then I wont be able to control exact locations of the rectangles.

Your help/advice is appreciated.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Info on packing regular tree-like structures into rectangles? VHDL 2 12-08-2005 07:19 AM
MIDP 1.0: Filled rectangles Michal Pleban Java 0 05-26-2004 10:53 AM
Collision detection with Rectangles Abs Java 4 05-14-2004 07:56 AM
[Q] Javascript to remove dotted rectangles in IE Paul Sellis HTML 9 02-24-2004 10:36 AM
Efficient method for drawing many rectangles. Chuck Dillon Java 4 02-10-2004 05:29 PM