Need advice on implementing drag/drop rectangles in applet

Discussion in 'Java' started by Ajay Patil, Dec 10, 2003.

  1. Ajay Patil

    Ajay Patil Guest

    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
     
    Ajay Patil, Dec 10, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    524
  2. Oliver Klein
    Replies:
    0
    Views:
    704
    Oliver Klein
    Aug 24, 2003
  3. Andy Fish

    drag and drop in applet

    Andy Fish, Sep 12, 2003, in forum: Java
    Replies:
    0
    Views:
    529
    Andy Fish
    Sep 12, 2003
  4. Erik H.
    Replies:
    2
    Views:
    628
    Erik H.
    Dec 1, 2003
  5. Alvin K

    Implementing Drag and Drop in ASP.NET

    Alvin K, Jul 27, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    143
    Alvin Bruney
    Jul 27, 2003
Loading...

Share This Page