Java System Tray Menu- pop up on left click.

Hi,
The system tray menu will normally pop up on mouse right click. I need to make this pop up on mouse left click. Is it possible? I had tried a lot and failed to find a solution. Please help me on this issue.
Thank You.

Hi,
Thank you for your answer,
I had tried a lot to make pop up the system tray menu on mouse left click. Finally i got a way to do this. My code is,
MouseListener ml;
        ml = new MouseListener() {
            public void mouseClicked(MouseEvent e) {
                if (mouseflag == 0) {
                    try {
                        Robot robot = new Robot();
                        // RIGHT CLICK
                        robot.mousePress(InputEvent.BUTTON3_MASK);
                        robot.mouseRelease(InputEvent.BUTTON3_MASK);
                    } catch (Exception exe) {
                        System.out.println("error=" + exe);
                    mouseflag = 1;
                } else {
                    mouseflag = 0;
        public void mouseEntered(MouseEvent e) {
          System.out.println("Tray icon: Mouse entered");
        public void mouseExited(MouseEvent e) {
          System.out.println("Tray icon: Mouse exited");
        public void mousePressed(MouseEvent e) {
          System.out.println("Tray icon: Mouse pressed");
        public void mouseReleased(MouseEvent e) {
          System.out.println("Tray icon: Mouse released");
      };here i had created a mouse right click using code (robot class) on mouse clicked. Now i can pop up menu on left click. But now my issue is, i am not able to remove right click functionality. I think this is in built function for system tray menu. please help or give suggestions on this issue. I think that the way which i used to pop up menu on left click is not a good one. If i removed right click then this code may not work.
Thank you,
Sreejith P.M.
Edited by: Sreeksd on Jan 6, 2011 11:39 PM

Similar Messages

  • Java System Tray Menu

    Hi,
    I am able to use a png icon in my system tray element. ( TrayIcon trayIcon =new TrayIcon(createImage("/images/e-vision3.png", "tray icon"));) . Now i need to add icons to some MenuItems. ie, Both menu name and an icon. I had tried a lot to make this working but failed. Please help me on this issue.
    Thankyou.
    Sreejith P.M.

    Hi,
    Thank you for your answer,
    I am not using JMenuItem. in my application i had used awt MenuItem. (ie, used MenuItem aboutItem = new MenuItem("About"); not JMenuItem aboutItem = new JMenuItem("About"); ) We can add trat icon to system tray. when mouse right click the menu and menu items will show. I need to add some icons in the pop up menu items. Can i do this?
    Thankyou,
    Sreejith
    Edited by: user13423634 on Dec 29, 2010 10:34 PM

  • Installation Master DVD Distributed Java System Copy menu missing

    Hello Gurus
    We want to perfom an Java system copy of our EP 6.0 using sapinst
    The source OS is Solaris 8.0 with Oracle 10.2.0.2
    The target OS is Solaris 10.0 with Oracle 10.2.0.2
    Our architecture is Distributed , CI is running on a system and DB server on another system.
    For this operation we use the master DVD 51033746_12 but we have an issue in exporting the DB as the
    Option for exporting the DB on a Distributed system is not displayed on the sapinst Menu .
    We followed the last guide taken from sap 'Homogeneous and Heterogeneous System Copy for SAP Systems Based on SAP Web Application Server Java 6.40 SR 1' and this option should be listed
    Excerpt:
    Choose the installation service SAP NetWeaver u201904 Support Release 1--> Java System --><DB> --> Distributed System --> Migration - Database Export.
    Unfortunately the Distributed system is not displayed and though we are stuck at the export step .
    I could not find any sapinst patches . Is it a known issue for Soalris system and is there a Workaround .
    Thanks for your help
    De Palma Lionel .

    Hello
    Thanks for your answer . Unfortunately this option is not available as we are using a NW04 SR1 system , not a nw'2004's one . With the latest master install (Installation_Master_6.20_6.40_05_08 51033746_5 )we have the choice of
    System copy  Source --> Java system --> oracle --> Migration Data  export 
                                    -->  HA Java system --> oracle --> Migration Data  export
    System copy  Target --> Java system --> oracle --> Central system-> Migration Data  export 
                          Target --> Java system --> oracle --> Distributed system -> Migration Target Central instance / Db instance install
    The Distributed system is available for Import option but no for the export one .
    My questions are :
    - Can we use a master nw2004's master DVD for system copy on a Nw'04s one ?
    - As the central instance is hosted on different system than DB instance , should I use the HA option ?
    Regards

  • System tray balloon pop-up

    How do I get rid of that annoying pop-up balloon that tells me LELA is still running whenever I Iconize it .
    Running WinXP SP3
    regards

    Yes, you can exit the program from the system tray and the phone will still be connected.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • JAVA + System Tray + Without dos

    please go here
    http://forum.java.sun.com/thread.jsp?forum=57&thread=540599&tstart=0&trange=15
    dukes dollar will be awarded

    DOLLARS HAVE BEEN INCREASED

  • How do i disable a java script error that pops up everytime i click on something?

    java script error Error: Permission denied to access property 'host'
    this continues to come up every time i click on something. this has only started since i downloaded firefox 4.0. how do i disable the pop up or do i just stop using 4.0? would go back to the last version but when i try to download that i'm told the files are corrupted

    Create a new profile exclusively for the 4.0 beta version and create a desktop shortcut with -P "profile" appended to the target to launch that profile.
    * http://kb.mozillazine.org/Testing_pre-release_versions
    * http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
    * http://kb.mozillazine.org/Shortcut_to_a_specific_profile
    * http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • Run program in system tray.

    Hi guys. how do i run my JFrame application in the system tray without using native code?

    You can use the JTray API (Java System Tray API For Windows) that can be found at http://www.JavaAPIs.com. It supports several image types, animation, and display of AWT and Swing Components as pop-ups.

  • How to add program to windows system tray?

    I heard from someone that in order to add a program to the system tray, I must use JNI. I want to ask whether there is any other alternative. If not, how do I go about doing it using JNI.
    Thanx in advance.

    You can use the JTray API (Java System Tray API For
    Windows) that can be found at http://www.JavaAPIs.com.
    It supports several image types, animation, and
    display of AWT and Swing Components as pop-ups. I always find it rather annoying when people scour past posts to promote a product that they have a vested interest in.
    Especially when they don't point out that that they have such an interest.
    Especially when they don't point out that the interest is monetary.
    Especially when they do nothing but post ads - never actually answering a single question.
    Just me I suppose.

  • Iconizing to System tray

    Can somebody please tell me how I can iconize and send to system tray my Swing Application?

    You can use the JTray API (Java System Tray API For Windows) that can be found at http://www.JavaAPIs.com. It supports several image types, animation, and display of AWT and Swing Components as pop-ups.

  • How to create system tray

    hey,
    have created my appln but wanted to put it as system tray icon and poping up when clicked.
    Could you please help me with some class files or JAR ?
    Thanks!!!
    Shan

    http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/systemtray/

  • Laserjet CP1025nw HP system tray has stopped working

    I bought this printer a month ago and about a week ago I started getting the error“HPCP1020SM.exe (64 bit) has stopped working.” then click close then“HP system tray has stopped working.” appears click close. the printer will still print but these errors continue to come up every time I print.  I called HP support but they have no clue.  Thanks for who ever can help.

    Hi  Have you tried installing the basic driver, and the basic driver update to see if you have the same issue? Let me know if you have the same issue using the basic driver. Can you also provide me a screenshot of the error message you are receiving? Firmware update: http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=lj-86491-4&cc=us&dlc=en&lc=en&os=228&product=4052972&sw_lang= Basic driver:http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=lj-90357-1&cc=us&dlc=en&lc=en&os=4063&product=4052972&sw_lang= Basic driver update:http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=lj-98162-1&cc=us&dlc=en&lc=en&os=4063&product=4052972&sw_lang=

  • The right click menu pops up after I push the right mouse button, instead of when I release it.

    I am using an extension All-In-One Gestures. It works on my other installation of Firefox 4 - particularly, the right-click menu pops up if I click right mouse button and then release it so I can perform gesture or turn the wheel instead of getting a right click menu.
    But on this installation (basically the same addons and OS), the right-click menu pops up on pushing down the right mouse button so the right-button+wheel gestures do not work, and the menu stays there while I am performing the gesture which is rather annoying.
    So I though maybe there is some obscure configuration option to toggle to make right-click menu pop up after the button release? Or is this entirely the extension's fault? Note that it does work as expected on other installation...

    You have to enable in Firefox
    -> Options -> Content -> Activate JavaScript (yes) -> More
    -> Allow scripts the following actions
    -> Inactivate or replace context menu (yes)
    in order to allow All-in-one-Gesture to block the immediate appearance of the context menu.
    If you forbid Firefox JavaScript and/or the manipulation of the context menu by use of JavaScript, All-in-one-Gesture cannot work properly.

  • Lenovo Thinkpad T420 trackpad and touchpad right/left click stopped working

    So I have had a very... VERY... irritating problem with my Thinkpad.
    For the first 6 or so months I had the laptop it worked fine. Then, the left click on the touchpad was functioning like the right click (bringing up a menu). 
    I immediately disabled the touchpad and then used the trackpad right and left clicks which worked perfectly.
    After another 4 or 5 months, those buttons stopped working altogether. I could still use the touchpad to move the arrow, but I couldn't click on anything.
    I bought an external USB mouse and that worked fine for another 2 months. Then for a few weeks, it would work on and off. I'd have to wiggle it around in the USB ports to get the laptop to recognize it. (it had nothing to do with the ports... there were 3 of them and they all worked fine).
    Then it stopped working completely, AND, my laptop refuses to acknowledge ANY USB I plug in. 
    I have run out of options now. I can't even install anything, download any files from lenovo website. I can't do anything. Does anyone know if it is still salvageable? Has anyone had the same problem?
    The lenovo digitizer for tablets.... would that work for this thinkpad? (sorry... not as tech savvy as the rest of you)
    Thanks a bunch,
    Amanda

    Here was my solution to this. My left click button on both the trackpad and touch pad suddenly stopped working on me. After putting up with this for a few weeks I decided to investigate. I found if I disabled the touch pad the trackpad left click would start to work again. So I investigated by carefully popping off the left click button for touchpad. Everything looked normal, so I investigated a little father buy removing the small round blueish rubber piece in the middle of the button. Once I did this I realized it quite dirty, with a soft cloth and a toothpick I cleaned both the contacts on the PC and the the black spot on the rubber piece, putting everything back together and my left click worked once again. 
    The cause of my problem was just a build up of dirt under the rubber contact which caused the button to short out and disable itself. 
    I didn't have to reinstall any software or drivers. 

  • Left click DOESN'T work (laptop)

    Product:  Hp Pavilion g6-2290ev
    OS:  Windows 8.1
    No changes made to the system before the issue occurred
    The left click was working perfectly but the next day was like stuck. After plugging in a USB mouse, which worked, the laptop left click stopped responding at all. I did download all the latest synaptics drivers even reinstalled it but nothing. Then i ran an HP PC Hardware Diagnostics UEFI and tested the mouse and gave me the failure ID : RLMXW2-6B76S5-MFPX0K-G2X203
    what should i do now?

    Likely the touchpad button board has gone bad and would need to be replaced. 
    Your Service Manual:
    Manual
    You have to replace the whole top cover. Page 21 lists the part numbers by color of the laptop. 
    Assuming you have black, here is a tested used on on eBay:
    http://www.ebay.com/itm/684177-001-681825-001-GENU​INE-HP-TOP-COVER-PALMREST-BLACK-G6-2000-GRADE-A-/2​...
    If this is "the Answer" please click "Accept as Solution" to help others find it. 

  • Popup Menu in system tray - Linux OS -- JAVA 1.4.2

    Hi,
    I have made an app in Linux( centOS 4.6) which need to pop a message up on system tray when a certain number is reached. I know there is the way to do in sdk1.6. The question: Is there any workaround for 1.4.2 because the deployment machine is in 1.4.2 and the customers dont want to switch to 1.6.
    Some hints, links or keywords are appreciated.
    Thank you

    Have a look at JDIC. (Note: I haven't used that yet, and I don't know which jdk it requires.)

Maybe you are looking for

  • Migrated Files to 10.5 from OS 8.6 - Now Have Permissions Issues

    I'm helping a friend move her files from her ancient PowerMac 7600 to her shiny new iMac. The 7600 is running OS 8.6, the iMac is running 10.5. She also has an install DVD for 10.6 but that will have to wait... I was able to connect the two computers

  • How do I get a home Icon back?

    I just got a Blackberry 7250, got it activated on Verizon with a phone and Blackberry data plan, but am missing the Icon for the web browser on gthe Home screen. Under Options/Advanced Options/Applications it shows a Browser 4.1 !. Is that the Web Br

  • Please help......using xilinx platform studio

    i ve done regression and synthesis of OpenSPARCT1.1.7 . then while doing generate bitstream using xilinx platform studio i got this error. XST synthesis ERROR:Xst:1484 - A core is unlicensed ! ERROR:MDT - Aborting XST flow execution! INFO:MDT - Refer

  • Prevent skype resolving?

    Hi, I have recently had a problem with a few people being able to get their hands on a nee "Skype resolved" which allows them to bypass the (only connect calls in contacts) and are currently able to get my External IP address. Now I would love to kee

  • Flash Interactivity

    I came across this website (below) recently and found the concept of an animated voiced flash file quite interesting. http://www.oddcast.com/sitepal/ I would like to incorporate this concept into my website but I was wondering to make it more realist