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
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