• Post Reply Bookmark Topic Watch Topic
  • New Topic

disabling mouse effects on swing forms

 
sinasi susam
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to disable mouse on swing forms.

Probably you will recommend "If you dont want to process mouse events then dont add any of MouseListeners."

I am not asking that.My problem is about focusing.Only with keyboard i want to manage the focusing...

Mouse must be useless focusing in UIs.Because wherever i click with mouse swing components ,cursor is jumping to clicked component in any case.
I dont want that.I want mouse is useless for focusing.

How can i do that?
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can add a mouse listener to the glass pane, a transparent panel which lays over the content pane of a JFrame. This will block mouse events from reaching the content pane and all the visible components.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!