Total members 9951 | Gratitudes |It is currently Sat Feb 11, 2012 10:06 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 2 posts ] 
Author Question
 Question subject: Detecting right mouse button click
PostPosted: Fri Oct 24, 2008 8:11 pm 
Offline
Proficient
User avatar

Joined: Sun Oct 19, 2008 3:47 pm
Posts: 281
Has thanked: 0 time
Have thanks: 1 time

How can I detect if the right mouse button was clicked from a swing
components mouse click listener?


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Detecting right mouse button click
PostPosted: Fri Oct 24, 2008 8:12 pm 
Offline
Proficient
User avatar

Joined: Sun Oct 19, 2008 3:53 pm
Posts: 229
Has thanked: 0 time
Have thanks: 0 time
*You can use this while you are listening*

*public* *void* mousePressed(MouseEvent e) {
*

if* (e.getModifiers() == 4) {

//Write your code

}

}


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 2 posts ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 put image on button in C#  Csharp examples  msi_333  2
 Hide the background image by one click  HTML examples  msi_333  0
 How to add Google plus button to smarty template (.tpl)  General Discussion  msi_333  0
 Change the mouse cursor to hand pointer  HTML examples  msi_333  0
 Change background position when mouse over  HTML examples  msi_333  0

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 4 guests



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team