Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Swing / AWT / SWT
MouseEvent.getButton() equal method in jdk1.1
Krishnamurthy Dara
Greenhorn
Posts: 7
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi All,
I am using jdk1.1 version. What is the equal method in jdk1.1 for
MouseEvent.getButton(). To catch the right click on the screen.
Thanks,
krishna
Michael Dunn
Ranch Hand
Posts: 4632
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
don't know what is/isn't supported in 1.1, but try these
public void mousePressed(MouseEvent me) { String btn = me.isMetaDown()? "Right":"Left"; String btn1 = me.getModifiers() == 4? "Right":"Left"; String btn2 = SwingUtilities.isRightMouseButton(me)? "Right":"Left"; System.out.println("btn = "+btn+"\n"+"btn1 = "+btn1+"\n"+"btn2 = "+btn2); }
note: needs additional code if you want to specifically ID the left button
i.e. as is, the mouse wheel button will also show as 'left'
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Is it possible to use web-start with jdk1.1?
parseFloat not working in Weblogic 4.5.1
Event that hangs
JSlider and "mouse click"
Class.forName() error
More...