Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-22-2008, 03:21 PM
Member
 
Join Date: Nov 2007
Posts: 3
cbalu is on a distinguished road
Strange behaviour in swing
Hi folks,
Today i noticed two strange behaviour in swing.
Case 1: Normally for every key events we used to get one keyPress and one keyRelease events.But this is not of the case with PrintScreen key. I tested this behaviour on the JNLP file used in java tutorial at this link itself.

Question: Why only PrintScreen has this kind of event associated with it?

Case 2: One more thing is that whenever we create a JMenu component on the JFrame we are able to access this menu by Left-Clicking on the JMenu component but accidentally i made a right click on the JMenu and that too populates the JMenu.

Question: How can i restrict Right-Clicking on the JMenu Component?

Image for your reference
1.JNLP file under my PC


Can anybody help????

Last edited by cbalu : 05-22-2008 at 03:22 PM. Reason: Added link
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-23-2008, 11:23 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,266
hardwired is on a distinguished road
How can i restrict Right-Clicking on the JMenu Component?
SwingUtilities has handy methods such as isRightMouseButton
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help on a strange file access prob squad Advanced Java 0 03-21-2008 12:55 PM
System.in.read(); strange error! kantze New To Java 2 03-19-2008 03:44 PM
Strange error message "Source not found" ppayal Eclipse 0 11-25-2007 08:19 PM
Un expected behaviour when reading from inputstream adoorsarath Advanced Java 3 08-10-2007 07:02 PM
map javax.swing.text.Element to javax.swing.text.View elizabeth New To Java 1 07-30-2007 09:02 PM


All times are GMT +3. The time now is 03:21 PM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org