Need advice on implementing drag/drop rectangles in applet

A

Ajay Patil

Hello,

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.

Ajay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top