Java Swing Mouse Event

Java examples for Swing:Mouse Event

Description

Click the following links for the tutorial for Swing and Mouse Event.

  1. Handling Mouse Events in Swing
  2. Mouse event handling.
  3. Demonstrating mouse clicks and distinguishing between mouse buttons.
  4. Adapter class used to implement event handlers.
  5. Move control as you move your mouse
  6. Move square and paint with Swing
  7. Draw with mouse using mouse event handler and JPanel
  8. Handle Mouse Event


  9. Handle Mouse Motion Event
  10. Handle Mouse Wheel Event
  11. Detecting Double and Triple Clicks
  12. Handling Mouse Clicks
  13. Managing extra mouse buttons and high resolution mouse wheels
  14. is Fast Click
  15. add Mouse Listener To All Component
  16. Returns whether we can use the secured and 1.5 MouseInfo class


  17. get Mouse Position
  18. A more descriptive variant of java.awt.event.MouseEvent#getClickCount() == 2.
  19. Returns, whether the left mouse button was clicked.
  20. Workaround for some operating systems where java.awt.event.MouseEvent#isPopupTrigger() does not return true if the user clicked down the right mouse button.
  21. get Key Mask from MouseEvent
  22. is mouse Left Click
  23. is Menu Shortcut Key Down in mouse event
  24. is Mouse Middle Click
  25. is Mouse Button Right Click
  26. Highlight JTextField the given label from the first mouse event to the second Returns true if the highlight was successful, false otherwise.
  27. Returns true if the given mouse event occurred within a highlight on label.
  28. Sets the wait (hourglass) mouse cursor for an application containing component.
  29. Unsets the wait (hourglass) mouse cursor for an application containing component.
  30. Checks whether the mouse event is a double-click event (with the left mouse button).
  31. Checks whether the mouse event is a left-click event.
  32. Checks whether the mouse event is a middle/wheel-click event.
  33. Checks whether the mouse event is a right-click event.
  34. Return true if the combination of mouse and keyboard buttons used to perform actions has been pressed (double click)
  35. Return true if the combination of mouse and keyboard buttons used to select additional objects has been pressed (ctrl + left click)
  36. Return true if the combination of mouse and keyboard buttons used to perform special actions has been pressed (ctrl + double click)
  37. Return true if the combination of mouse and keyboard buttons used to press buttons with a special function has been pressed (ctrl + left click)
  38. Return true if the combination of mouse and keyboard buttons used to move objects has been pressed (shift + left click)
  39. Return true if no mouse buttons are pressed
  40. Return true if the combination of mouse and keyboard buttons used to open popup menus has been pressed (right click, or ctrl + click in Mac Os)
  41. Return true if the combination of mouse and keyboard buttons used to press buttons has been pressed (left click)
  42. Return true if the combination of mouse and keyboard buttons used to select all objects in a range has been pressed (shift + left click)
  43. Return true if the combination of mouse and keyboard buttons used to select objects has been pressed (left click)
  44. Determines if the event is originated from a left mouse button
  45. Determines if the event is originated from the right mouse button
  46. Returns true if parameter is a 'double click event'
  47. Return true if the ctrl button was pressed