Results 1 to 7 of 7
  1. #1
    Ami
    Ami is offline Member
    Join Date
    Feb 2012
    Posts
    26
    Rep Power
    0

    Default Drawing an arrow between 2JCheckBoxes

    Hi,

    I'm trying to draw an arrow which connects 2 JCheckBoxes (starts at one JCheckBox and ends at another).

    I managed to get the location (x and y co-ordinates for the checkboxes), but now I'm stuck on drawing the arrow from one checkbox to the other.

    Any help would be really appreciated.

    Thanks
    Last edited by Ami; 07-17-2012 at 07:01 PM.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,529
    Blog Entries
    7
    Rep Power
    20

    Default Re: Drawing an arrow between 2JCheckBoxes

    If the arrow crosses at least one other component, consider drawing on the glass pane of the parent window.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Ami
    Ami is offline Member
    Join Date
    Feb 2012
    Posts
    26
    Rep Power
    0

    Default Re: Drawing an arrow between 2JCheckBoxes

    Thank you for your help, but the arrow shouldn't cross through any other components. Any suggestions will be appreciated. Thanks

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,529
    Blog Entries
    7
    Rep Power
    20

    Default Re: Drawing an arrow between 2JCheckBoxes

    Does the arrow leave one JCheckBox and enters the other one? If so, my suggestion still applies; if not, please explain.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    Ami
    Ami is offline Member
    Join Date
    Feb 2012
    Posts
    26
    Rep Power
    0

    Default Re: Drawing an arrow between 2JCheckBoxes

    The arrow should start at the end of one checkbox and end at the start of the other, the arrow should not cross through any of the checkboxes, thanks

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default Re: Drawing an arrow between 2JCheckBoxes

    Do you know anything at all about how to do custom painting?
    Lesson: Performing Custom Painting (The Java™ Tutorials > Creating a GUI With JFC/Swing)

    Moving this thread to the AWT/Swing section.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  7. #7
    Ami
    Ami is offline Member
    Join Date
    Feb 2012
    Posts
    26
    Rep Power
    0

    Default Re: Drawing an arrow between 2JCheckBoxes

    Not really, I'll look at it, thank you

Similar Threads

  1. Arrow Keys?
    By Alerhau in forum New To Java
    Replies: 10
    Last Post: 06-17-2011, 07:45 PM
  2. Help in bow and arrow game
    By sahildave1991 in forum AWT / Swing
    Replies: 6
    Last Post: 10-18-2010, 02:34 PM
  3. Arrow Button Example
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 07-11-2008, 04:44 PM
  4. Draw an arrow
    By Albert in forum SWT / JFace
    Replies: 3
    Last Post: 02-01-2008, 08:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •