CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2000
    Posts
    123

    mouse/keyboard events

    Looking for sample on how to trap enter key or double click so I can perform other actions...thanks!


  2. #2
    Join Date
    Jan 2000
    Location
    CA, USA
    Posts
    305

    Re: mouse/keyboard events

    Handle MouseListener for mouse events and
    ActionListener for key events.

    for capturing double click,

    void mouseClicked(MouseEvent e)
    {
    if (e.getClickCount() == 2)
    {
    //write your code here
    }
    }

    Kannan



  3. #3
    Join Date
    Mar 2000
    Posts
    123

    Re: mouse/keyboard events

    Thank you...is there a similar listener to trap the enter key?


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured