Hi!

Good day!

I just would like to ask if I will be able to create a behavior that will awaken when 
the left mouse button is pressed not only my Mouse Keypresses.

Like this?

    WakeuponAWTEvent mouseevent;

public void Initialize()
{
   mouseEvents = new WakeupOnAWTEvent(InputEvent.BUTTON1_MASK);
    wakeupOn(mouseEvents);
}

public void ProcessStimulus(Enumeration Criteria)
{
    wakeup = (WakeupCriterion) criteria.nextElement();
    if (wakeup instanceof WakeupOnAWTEvent)
    {
                  event = ((WakeupOnAWTEvent)wakeup).getAWTEvent();
              for (int i=0; i<event.length; i++)
                    {
                      processMouseEvent((MouseEvent) event[i]);
                               x = ((MouseEvent)event[i]).getX();
                       y = ((MouseEvent)event[i]).getY();

                    }
    }
}



      public void processMouseEvent(MouseEvent evt)
          {


                if ((evt.getModifiers() & InputEvent.BUTTON3_MASK)== 
InputEvent.BUTTON1_MASK)
                {
                        System.out.println("Pressed Left maws button");

                }
    }


Thanks!

BAMBAM

__________________________________
www.edsamail.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to