Need to create menu on mouse right click

I have a web application with frames with one frame have a tree.
Now i want to right click on one node and say "Copy" the node to another location in the tree..
My problem is that i am able to get how to create the menu option on right click.
Can anybody suggest how to acheive this

i'm pursuing the same thing. i believe ONE way of doing it is to add an ActionListener to the component, whether it be the frame or the node component you speak of. compare the action event object to the right click of the mouse, if it's true the trigger a menu, and ideally place the menu object next to the x,y coordinates of the mouse cursor (either to the left or to the right depending on where on the screen the cursor is.
as far as how a menu is created i do not really know and would also like some information on that.
i'm guessing it should be related to the JMenu object (directly a subclass of JMenuItem which in turn is a subclass of AbstractButton). That's a good place to start from. let me know if you get anywhere on this.
-William

Similar Messages

  • Mouse Right-Click menu with JTextField and swing

    Hello,
    I created a small app for providing an organized gui to insert data and log it to a text file. I just recently converted it to swing to improve the functionality of it and try to get away from some of the bugs I found in using regular java.awt.
    So far so good, all of my complaints with regular awt are gone using swing, but I have one problem I see as a real pain.
    With a TextField in java.awt you can right click and get the standard mouse-menu. The mouse menu is nice for cut/copy/paste type operations and I do not want to lose this functionality.
    But with swing and JTextField I am not getting the menu. I right click in there and get nothing. My UIManager is loading the OS one (windows) and I cannot find a way to recover this feature.
    Does anyone know how I can get this working?
    Thanks,
    Lucas

    Well as I posted here to try and see if there was a way to recover what the OS already provides I have struggled through creating a popup menu.
    I have the cut, copy, paste and selectall complete but I am struggling with the undo option.

  • Cant see MOUSE RIGHT CLICK menu

    WINDOWS 7 cant see MOUSE RIGHT CLICK menu -WHEN i right click menu is BLANK - sometimes if i goto up or down arrow it appeares then dissapears befor i can select it

    This is probably due to a problem with an add-on. Follow the procedure in the [[troubleshooting extensions and themes]] article to identify the culprit.

  • The mouse right-click (to copy-paste) menu does not work correctly.

    The mouse right-click copy-paste menu often fails in Firefox 4. If I highlight something to copy and then use the mouse to right-click on it, the menu will appear down and to the right. Second, the highlighted command (i.e. copy, paste, etc) will be two steps beneath the mouse pointer. Third, if one chooses "copy" for example, your highlighted text might or might not (usually Not) be copied. This works as expected (perfectly) on this Firefox site, but fails on all other web pages. Note: This is a "company computer" where I am not an administrator.

    I am the admin on my PC, and I am not able to select the copy page after I have highlighted an area. I can if a link select copy link, but in short no more copy paste feature on this new Firefox.

  • 64 bit Ubuntu 10.10 FF 3.6, top menu does NOT function nor does mouse right-click, all other applications O.K.

    Running 64 bit Ubuntu 10.10 upgraded from 10.04
    Running latest 3.x.x Firefox
    On rebooting this morning the top menu does not function at all, nor does mouse right-click.
    Did 'complete removal' in Synaptic and reinstall to no avail.
    Thunderbird and Google Chrome functioning fine.

    Fixed!
    open a new instance of Firefox (ctrl-N). You will notice all is working now. Close the old instance, so whatever Firefox remembers as your last instance is the new, good one. Worked for me. This problem seems to have been around a while already, this fix dates from November 2010...

  • How to enable Fullfillment set menu in the Right click at the line level for a responsibility?, by default it comes for OM ADMIN.

    How to enable Fullfillment set menu in the Right click at the line level for a responsibility?, by default it comes for OM ADMIN.
    for this responsibility i need to have teh sets enabled. how to do teh same.
    similar to OM ADMIN as shown below:
    Kindly advice on teh steps. i believe its some menu /function inclusion can you pl share teh pointer.
    regards,
    bala

    AFAIK then there is no way to do that system wide. You can only do that via userChrome.css or an extension like the Menu Editor per profile .You can install extensions globally, but the user will have to enable them anyway. That is not required for userChrome.css code.

  • My iMac mouse right click does not work now

    Hi all,
    My iMac mouse right click does not work now.  It was fine a couple of days ago. 
    Right click is definitely enabled, I have checked it several times.
    A Google search revealed that in Firefox it could be that I'm not using the latest version of Firebug.  I have auto updates on and Firebug is the latest version 1.11.3
    I use right click for correcting spell checked words, instead of a suggested correct spelling I get the 'open in a new tab' menu.
    In Firefox when I right click to open in a new tab I get the menu but it does nothing.
    It is driving me mad
    Any help will be greatly appreciated,
    Thank you
    P.S. thought it was suddenly working when I did the spell check in this post but it was the left click doign it....

    I don't use Firefox so I can't test it, but it might be something to do with a preference setting. Have a look at this link (ignore all the instructions), just look at the image of the preferences, there appears to be a setting in Javascript preferences relating to contextual menus. Check to see what your settings are:
    http://stackoverflow.com/questions/16377381/disable-firefoxs-silly-right-click-c ontext-menu

  • Disable Mouse Right click inside Adobe Acrobat PDF plugin

    Hi All,
    We are rendering Adobe live cycle pdf file inside html object tag.
    I have disabled toolbar , navigation bar using navpanes=0&toolbar=0.
    But when mouse right click reenable the context menu again.
    So Is there any way to disable mouse righ click inside Adobe Acrobat PDF browser plugin?

    I had the same problem after updating Firefox to version 4.0 and Acrobat Reader to Version X. For me (Win XP) what solve the problem was deleting the Acrobat Reader Plugin (nppdf32.dll) in the Firefox plugin folder (C:\Program Files\Mozilla Firefox\plugins). So now there is only one Acrobat Reader Plugin left namely the one in the Acrobat Reader plugin folder (C:\Program Files\Adobe\Reader 10.0\Reader\Browser).

  • Mouse Right Click

    Hello all,
    How to track mouse right click in Oracle Forms? I have a form which has a popup menu, based on the item status i have to enable and disable some options in the popup menu. Any ideas?
    With Regards,
    Yathish

    try the PRE-POPUP-MENU - trigger

  • Can a Mouse right-click?

    I'm confused. Will a mouse's right click still work on a Macbook? With my older iBook, my "Dell" two button mouse will give the contexual menu with a right click. My friend has a new Macbook and says the right click doesn't work. Is something wrong? Or do the new MacBooks not support the right-click? (i've read a bunch of mice related posts, but still confused.)
    Thanks!

    I use the Logitech S530 and the mouse works just fine.
    You can also right click using the trackpad, just set it up in the keyboard/mouse preferences panel.
    Also, set up two-finger scrolling. You will love that!
    Good Luck.
    Adam

  • JPopupMenu - disabling mouse right click

    Hi,
    First of all, before I write the problem here, I searched a lot but I actually could not find the desired solution.
    The problem is;
    I have a JPopupMenu. As you know, all mouse clicks (left click, middle click and right click) do the selection in popup menu and then it tries to perform the related action. Finally, the popup menu disappears. But, what I want actually is that "my popup menu will not respond to the mouse right click and will not disappear after that right click".
    Can anyone say how to make that happen?
    Thanks a lot.

    The following is an example code, and I did not the details of how the popup menu showed. I just showed how the actions are added to the popup menu elements. In this example, in the popup menu there are Text1, Text2 and Text3 selections and their actions are added like in the code. So, my actions are seperate for each element in the popup menu. Now, how can I make the mouse right click will not enter the related selection's actionPerformed (e.g; Text1, Text2) and the popup menu will not disappear?
    public class JPopupMenuTest {
        public static void main(String[] args) {
            JPopupMenuTest popupTest = new JPopupMenuTest();
            JPopupMenu popupMenu = new JPopupMenu();
            popupMenu.add(popupTest.new Text1Action());
            popupMenu.add(popupTest.new Text2Action());
            popupMenu.add(popupTest.new Text3Action());
        class Text1Action extends AbstractAction {
            public Text1Action() {
                super("Text1");
            @Override
            public void actionPerformed(ActionEvent e) {
                // Here is the Text1 action performed
        class Text2Action extends AbstractAction {
            public Text2Action() {
                super("Text2");
            @Override
            public void actionPerformed(ActionEvent e) {
                //  Here is the Text2 action performed
        class Text3Action extends AbstractAction {
            public Text3Action() {
                super("Text3");
            @Override
            public void actionPerformed(ActionEvent e) {
                // Here is the Text3 action performed
    }

  • X130e - "mouse right click " short cut on keyboard

    I just bought Thinkpad x130e
    I desperately need "mouse right click " shortcut on my keyboard, I am soo use it....
    May I know how can i get on my keyboard ?
    all other leading brands has this shorcut key on their laptop's keyoard ! I am really shocked Thinkpad series doesn't have this, 
    is there a way to Remap ???
    Regards 
    Shahnmn

    Good Morning,
    Try hitting shift and F10 at the same time is how you right click. 
    This should work.
    Serge E. Minott

  • Why keyboard and mouse right click not working in Solaris and Linux?

    Hi all,
    I have two problems:
    1) I am working on AWT/Swing application and its working fine in window enviornment,but while running on solaris and linux mouse right-click option window not poping up.
    2) Ctrl+c,Ctrl+v,Home and End keyboard key are not working in solaris and linux OS for same application.
    Pls provide me some solution for these problem.
    -Dinesh

    Hi Nik,
    Thanks for reply. I found some solution for the above problem.
    For mouse right click there was problem in my source code.I have not implemented the mousePressed() method
    In case of keyboard Home, End and arrow key working fine after exporting AWTUSE_TYPE4_PATCH=false; in solaris and linux
    But still Ctrl-c and Ctrl-v not working.
    I am using JDK1.5.0_07+Eclipse IDE 3.1
    -Dinesh

  • Is it possible to have Flash open the menu when you right click a link?

    I'm using sIFR 3 on a few of my websites. Personally I think it's a really cool and nice solution. I have had no issues with it so far except what I've recently discovered.
    When you right click on a link (or control click on a mac) it should have the normal menu you'd get if you clicked on a regular HTML link. Also when you hover over the link it doesn't display the status in the status bar (i.e. the URL the link will take you to if you click it).
    Anyways, I'm trying to come up with a workaround to this (personally I think the developers should have already thought of one but I guess not). That being said I'm wondering if Flash can do something like that. Is there a code I can put in the Actionscript to tell it to open up the browser menu when someone right clicks or control clicks a link?
    For some reason I'm thinking this isn't possible without JavaScript but I have had some people telling me in the current version of Flash it isn't possible at all. I'd be interested in hearing everyone else's opinion.
    To see what I'm talking about check out this website I'm building here... http://dev.thinktecmediagroup.com/fibre-federal/
    Notice that the top navigation (and side navigation) is all done using sIFR. IF you try and right click (or control click on Mac) on one of the links you'll see nothing happens.

    Probleme solved without having to change anything in the flash.
    The solution was to add a small part in the CSS in HTML
    html {
    overflow-x: hidden;
    overflow-y: auto;
    Solve probleme. All browser. VERY usefull to know !

  • Mouse right-click function doesn't work in Bookmarks (Mac)

    I recently switched from PCs to Macs. No problem downloading Firefox and transferring old bookmarks and other settings, with one exception. With the PCs, when I right-clicked a particular bookmark under Bookmarks I got a series of 12 options (from Open, Open in New Window to Delete, Sort by Name, Properties). I used these a lot to delete bookmarks, change names, alphabetize lists, etc. I can now do most of these things under the Manage Bookmarks setting, but when I right click bookmarks now the new bookmark I click on just replaces the one on screen (ie, the right click does exactly what the left click does). I am using two different mice (Apple Mighty Mouse with Leopard, Microsoft Wheel Mouse with Tiger) and the right click function behaves as expected in other programs. Are these mouse right click Bookmark functions supposed to appear with the Firefox for Mac? If so, any ideas how to resolve my problem?

    Can someone explain to me why it's possible in Chrome on Mac, but not on Firefox? This is my 2nd biggest complaint about FF on the Mac, only surpassed by missing favicons in bookmarks. Chrome does both very well.

Maybe you are looking for

  • STRANGE!!! Script in a Workbench Request.

    Hi All, Generally i am told: 1. All Client Dependent objects (Table Entries) ask for customizing request. 2. All Client Independent objects (Cross-Client table entries) ask for Workbench Request. The SAP Script which is a client dependent object, but

  • Rebuild indexes on partitioned table

    Hi We have a very large table hh_advance which hold 1.5billion records and is partitioned by range we a index (non parititioned) index on this table. after adding partitions to hh_advance table the index has become unusable the size of index is too h

  • Material Master Views

    What are the two views that are automatically created when we create a material.

  • Why is Mountain Lion not for MacBook Pro 15

    I have a MacBook Pro 15" bought 04/2010 running OSX 10.7.5 and fully up to date.  It has all the requisites needed to load Mountain Lion, but cannot because I keep getting: 'Could not complete purchase.  OSX Mountain LIon is not compatible with this

  • Firefox will not start and I already tried ALL the suggestions.

    Hi, Firefox is my favorite browser that I've been using for years and all of a sudden it won't start. I've already tried the following and it will not open at all, ever. I'm on windows 7 and have never had a problem before. 1. I disabled my anti-viru