Results 1 to 3 of 3
  1. #1
    such orb is offline Member
    Join Date
    Mar 2012
    Posts
    24
    Rep Power
    0

    Default some simple wait for a mouse click code

    hi, i want to pause program execution until a mose click happens... i'm using a Thread.sleep(2000); command to pause the code. is there a quick method/way to do this?

    here's a code snippet to demonstrate the Thread.sleep thing that i am using.

    try {
    Thread.sleep(2000);
    } catch (InterruptedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }

    thanks!

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

    Default Re: some simple wait for a mouse click code

    1. You didn't bother to reply to my response on your previous thread jlabels don't size by using setbounds within a null layout
    2. You didn't bother to learn how to use code tags as advised.

    Do you consider yourself worthy of getting help on a forum?

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

Similar Threads

  1. Mouse Click not working.
    By itcmanish in forum AWT / Swing
    Replies: 1
    Last Post: 01-12-2012, 04:25 PM
  2. mouse click listener from textfield
    By ryanmk54 in forum AWT / Swing
    Replies: 2
    Last Post: 05-11-2011, 03:22 AM
  3. Replies: 6
    Last Post: 01-03-2011, 08:08 AM
  4. Mouse Click changes Color of Rectangle
    By DocIcarus in forum New To Java
    Replies: 1
    Last Post: 11-23-2010, 02:53 PM
  5. mouse click alert
    By amir in forum AWT / Swing
    Replies: 1
    Last Post: 08-05-2008, 11:42 PM

Posting Permissions

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