Help using right-click to display text in the console/call a pop-up menu

Hi folks,
I hope someone can help me with this problem because, to be honest, I cannot see where I'm going wrong!
Basically, I'm trying to create a routine to display a bit of text in the console (and, if I can get this to work, call a pop-up menu) if a user clicks on an image panel (which I've already created and works fine). My code for this is as follows:
// --- Rest of program here
this.addMouseListener(new MouseAdapter()
public void mouseClicked(MouseEvent e)
// This bit works fine
if (e.getClickCount()>=2)
// Display a dialog box if the user double clicks on the panel
else if (e.isPopupTrigger())
System.out.println("Right mouse button clicked")
// Rest of program in hereThe problem is that, despite my best efforts, "Right mouse button clicked" does not display in the console if the right mouse button is clicked, and I cannot figure out why. I can, however, get it to work PARTIALLY if I use e.isControlDown(), but this only works (I guess) if the user is working on a Mac but isn't using an external mouse. Not ideal.
I'm developing on a Mac (10.4.8) using Eclipse (rather than a PC), but this surely cannot be the problem?

Do you start this application in a console window?
If yes then isPopupTrigger() is never true - presumably mouseClicked gets called.
If no then please note that java does not 'pop' a console window when System.out is called. System.out represents an existing output connection. If you want to pop some sort of console then you need to add code to do that.

Similar Messages

  • How do I use Right Click Functionality in Captivate 5

    Hello there,
    I am trialing Adobe Captivate 5, with a view to purchasing it, and I have been loving it, but have hit a snag.  My Right Click actions are not working except with the web preview.  I noted from the manual a lot of restrictions and from reading here I am not able to change AS3 to AS2.  Does this mean Captivate 5 does not let you use Right Click options.
    I would greatly appreciate your help because I do love this software but if I can't create elearning with multiple Click Boxes and Right Click functionality, I may have to look elsewhere.
    Thanks again.
    Penny

    Rodward,
    I downloaded and unzipped the file you linked. On my work laptop with XP, IE 8, and Captivate 4, it ran perfectly.
    On my personal laptop with Windows 7, IE 8, and Captivate 5, it did not run. (I got the JavaScript line 81 error.)
    On my personal laptop, I created my own right click project in Captivate 5, published with accessibility turned off, and it would not run (line 81).
    I copied my Captivate 5 published files to my work laptop, and it would not run there either.
    I don't have any third party toolbars installed on either machine. I'm running Symantec antivirus on my work laptop (where your project worked but mine didn't) and AVG on my personal laptop (where neither project worked.)
    Is there something you did in your JS file? Or some little tweak you made in your Captivate project?
    Doug

  • Using firefox 14.0.1. Loading a link using right-click and "Open Link In New Window", results in new window opening but address bar does not show URL..

    Using firefox 14.0.1. Loading a link using right-click and "Open Link In New Window", results in new window opening but address bar does not show URL. However, if I right click on a link and select "Open Link In New Tab", the Tab shows URL in address bar. So it's working when it's a New Tab but not a New Window.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • Has photoshop started using EXIF orientation to display photos with the right rotation?

    Has photoshop updated recently and started using EXIF orientation to display photographs with the right rotation?
    I thought in the past it ignored the EXIF orientation, but it seems like it is now using it. Does anyone know if you can tell it not to use this information when displaying the image on the screen?
    Please help!!

    Duh! My apologize for not providing the important details.
    The system model I have tested on:
    Mac Pro Early 2009
    2.66Ghz 10GB Memory
    Dual NVIDIA GeForce GT 120 512MB Cards (original cards)
    Tested on 10.7.4-10.7.5, 10.8.2
    Crash Report can be located here:
    http://pastebin.com/aeZ2kYvw  (this was using version 10.7.4)
    It's just odd since last year we've been using this setup fine with v13.0 and now with v.13.0.3 it doesn't work. The reason for our two independent video cards is so that one card sends video to the monitor screen of the teacher, the second card sends a video signal that can be switched to either a projector or 8 lcd monitors in the lab (we've invested a lot of video infrastructure for this lab). When we tested using a single card for both outputs we would get an odd interlace horizontal thin bar that would go top to bottom ever so slowly. This would appear either when looking at video or when moving windows around. Doing the dual video cards solved that issue for us and have been using the setup since 2009.

  • Why does system preferences not pop up after 2nd time accessing it using right click on desktop?

    Any help? Genius bar was stumped. I reinstalled mt. lion, but it still persists. Thanks.

    Your question is very confusing ... especially "after 2nd time accessing it using right click on desktop".
    "Using right click" -- why would you do that?  What are you right clicking?
    "On desktop" -- does that mean on a vacant area of your desktop?
    Anyway, a quick way to System Preferences is to simply click normally on the System Preferences icon in the dock, which looks like this:

  • How can i see the MENU bar. Help says "Right-click on an empty section of the Tab Strip. What is a Tab Strip?

    My friend just bought a Windows 8 laptop so I told her to download the latest version of FireFox. Unfortunately, some idiot removed the Menu Bar which most people love. You can see all of your options in plain English. Anyway, I referred her to help and cannot believe it's so hard to get a simple answer to this question. Why does FireFox make it so difficult to get an old fashioned menu bar?
    Help says, "Right-click on an empty section of the Tab Strip and check Menu Bar". OK, what is a "TAB STRIP" and where does she find it? Who writes these silly, useless help tips?

    Grad, you made some good points but we still disagree. I'll acknowledge that maybe millions was a slight exaggeration but nobody has an accurate count. However, I do understand the difference between making something simple and obvious versus a programmer trying to prove how clever he or she is.
    Grad, I'm guessing you and your friends are much younger than us as we are well above the age of 50.
    As for the number of clicks, I'm confused by your comment. My Menu Bar is always visible so I have to merely '''click once on Bookmarks''' to get to those menu options. It sounds as if you have to initially click on the orange FireFox button in order to see the Menu Bar, and then click a 2nd time on Bookmarks. That sounds like 2 clicks of the mouse to me.
    I have Windows 7 and never saw Windows 8 so I can't comment on your excellent question. I personally had the '''Menu Bar displaying 100% of the time''' for as long as I could remember. I just couldn't remember how I initially turned it on several years ago and the help file proved to be more confusing than helpful.

  • Why cant i use right click on the mouse

    I am trying to play starwars empire wars for the mac, is says left click to high lite a unit, and right click to move them but the right click dosent work like the PC.
    HELP any advice would be much appriciated
    thanks in advance

    If you are using a mouse, try using Control-click to get the right click function.  If a Magic Mouse, go to System Preferences > Mouse and check the box for secondary click, that is the right click enabler.

  • MacBook Pro w/ retina keeps crashing in some apps when using RIGHT CLICK?

    Hi every time I RIGHT CLICK in some apps "The Spinning Rainbow Beach Ball of Death" comes, I can also see in CPU usage that the freezing software top to 99,9% of usage.. I recent;y updated to 10.8, but in a week it is the first time I meet this problem. No apple apps nor Google chrome do that, only apps such Evernote, uTorrent, Google Sketchup, Microsoft office, Skype do that but not always.. Sometimes apps work great and when I reboot my Mac, and use right click in them, BANG! Freeze! I've tried repair permission in disk utility, but the problem persist. What can I do?
    Thanks for helps!

    Try opening Disk Utility and repairing permissions.

  • Problems using right click to open in new Tab or Window. Will not work. How do you solve this. Have v5.0 installed.

    I have the latest version of Firefox installed. Version 5.0.
    When searching on Google and use right-click to open in new tab or window. Keep getting blank tab.
    Can somebody advise how to solve this.
    Thank you.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the ''Safe mode'' start window.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

  • How to know the sales order closed using right click menu -Close ???

    I have an sales order with ten item, I have copied the same to delivery and before adding the Delivery I have deleted some items. After adding the Delivery, I manually closed the sales order by using the "right click menu close".
    The Open Quantity of those lines are already closed while i Close it manually.
    Now i need  a report regarding the sales orders which i  have closed manually. Any Options??

    Check the below result
    DocNum     DocDate     CardCode     CardName     Row#     ItemCode     Dscription     Price     Quantity     LineTotal
    2     2012-02-04 00:00:00.000     ED-C-102     AI HUDHA BOOK STALL     2     1010          150.000000     10.000000     1500.000000
    3     2012-02-04 00:00:00.000     ED-C-103     AL AMEEN ENGLISH SCHOOL-MANKADA     2     1011     ZINC ROD HIGH GRADE PURE ZINC 140 X 9 MM     59.790000     10.000000     597.900000
    this is the result i get while i execute your query
    but look at the db result
    DocEntry     LineNum     TargetType     TrgetEntry     LineStatus     ItemCode     Quantity     OpenQty
    1     0     15     2     C     1010     10.000000     0.000000
    2     0     15     3     C     1010     10.000000     0.000000
    2     1     -1     NULL     C     1010     10.000000     0.000000
    3     0     15     4     C     1010     1.000000     0.000000
    3     1     -1     NULL     C     1011     10.000000     0.000000
    3     2     15     4     C     1012     15.000000     0.000000
    3     3     15     4     C     1013     20.000000     0.000000
    4     0     15     5     O     1010     10.000000     5.000000
    See the last line data...it have open quantity of 5 and it also have the target type 15, If I close the sales order with docentry 4 manually using right click, the open quantity will be Zero..
    I need that last line result also as my output..
    Hope you understand my problem.
    Thank You

  • Why does the Right-click - "t" delete a bookmark on the bookmark toolbar, when Right-click - "t" opens a new tab elsewhere. The bookmark toolbar use Right-click - "w" to open in a new tab. Please change this to "t" to...

    Why does the Right-click -> "t" delete a bookmark on the bookmark toolbar, when Right-click -> "t" opens a new tab elsewhere in Firefox. The bookmark toolbar use Right-click -> "w" to open in a new tab. Please change this to "t" to... I keep deleting all my bookmark because you don't make the commands consistent!

    If you have accidentally removed bookmarks then use "Organize > Undo" in the bookmarks manager (Bookmarks > Organize Bookmarks) to get them back.<br />
    The Organize button is the first of the three buttons on the toolbar in the Library (Bookmarks Manager).<br />
    That only works if you haven't closed Firefox.
    [https://bugzilla.mozilla.org/show_bug.cgi?id=301888 Bug 301888] – Bookmarks cut instead of opened in new tab from Bookmarks Toolbar Folder
    (please do not comment in bug reports; you can vote instead)

  • Error KeyNote 09 with mouse right click over any text box

    Hi,
    I always receive the message "Unexpected error" when right click over any text box on Keynote 09.
    I have tried everythin (remove preferences, reinstall, ...) but nothing works...
    Any suggestion?
    Regards,

    Hi All,
    I found the culprit to be Babylon as well. Instead of removing Babylon, I changed the key combination to something funky like CMDOPT+SHIFTMOUSE click to call up the translator. After doing so, the Keynote right-click error went away.
    cheers

  • Upon right clicking a hyperlink, image, etc., the properties button no longer appears in the list. (I am using FireFox version 3.6.3)

    When right-clicking an image, hyperlink, etc., the "Properties" button is not in the drop-down list as it has always been in previous Firefox versions.
    == This happened ==
    Every time Firefox opened
    == Installation of Firefox version 3.6.3

    Properties has been removed from the right-click context menu. You now need to use right-click '''''View Image Info''''' or '''''View Page Info''''' > Media and scroll down the list of items to see the properties.
    Do not post at the following link; just read the discussion. See [https://bugzilla.mozilla.org/show_bug.cgi?id=513147 Bug 513147] – Get rid of the "Properties" context menu item.
    The following add-on will add the "Properties" option to the right-click menu in Firefox 3.6 and higher: https://addons.mozilla.org/en-US/firefox/addon/14228

  • Missing share menu option using right click

    Hi everybody,
    I've been seeing quite a few videos that with twitter integration in OS X mountain lion, I am able to share the url or pictures directly from web browser (Safari). Something like what this video does:
    http://youtu.be/nUc97k4Poko
    While I am able to share links of websites by clicking the share button beside the address bar, I did not manage to see any share menu option when I right click on an image within the browser. I tried it on several sites and on various images but all I could do is open the image in new tab/window or download and save the image somewhere. Why is this so?
    I am still pretty new in the world of mac OS so please kindly guide me along if you know the solution. Thanks!

    Regarding the ATI option;
    This option appears only using Windows XP.
    Using XP you can reach the ATI settings with right click on the desktop -> Properties
    In Vista you should find the ATI Catalyst in Start -> All Programs -> Catalyst Control Center
    Regarding the battery time;
    Battery working time depends on the notebook usage and on the battery.
    If you are running heavy performance applications then the battery will last not longer as one hour.
    You can extend the battery working time if you would dim the screen brightness and would use a stronger battery with higher mA value.

  • Unable to use right click on Context in a view..........

    Hi,
      I'm unable to use right click for creating nodes and attridbutes in a 'Context' of a view. Where as I can right click on 'RootUIElementContainer' and create elements. Can anybody have the idea to resolve this.
    Thanks.
    Nag.

    Thanks for the reply. I'm unable to get right click on context in change mode. I have been working without any problems for a quite few applications. But now I find that right click doesnot work on context.

Maybe you are looking for