Popupmenu with a right click  on a table

hi,
is it possible to popup a menu on the table if rightclicked...
regards

check this piece of code, i m not getting the popup
public void mouseClicked(MouseEvent me){
     int m=me.getModifiers();
if(m==InputEvent.BUTTON3_MASK)
               System.out.println("right clicked");
               if(me.isPopupTrigger())
JPopupMenu jpm=new JPopupMenu();
               JMenuItem bin=new JMenuItem("BIN");
     JMenuItem hex=new JMenuItem("HEX");
               JMenuItem oct=new JMenuItem("OCT");
               jpm.add(bin);jpm.addSeparator();
               jpm.add(hex);jpm.addSeparator();
               jpm.add(oct);jpm.addSeparator();
               JButton j=new JButton();
               jf1.getContentPane().add(j);     
               t.add(jpm);
     t.addMouseListener(m);

Similar Messages

  • I hid the address bar with a right click option, and cannot seem to get it back, how can I do this?

    I was watching some TV on the WB, and their player doesn't have a 'pop out' option, so I opened it in a new window, and hid the address bar with a right click-> hide option or something along those lines, and now I can't seem to get it back with the same methods, nor can I find a way to access properties or anything. All I can see are the tabs I have open and the bookmark bar.
    Any help would be greatly appreciated

    There are different solutions depending on kind of the problem.
    Keyboard:Alt+V,T,N
    Navigation toolbar, including address bar, should appear
    Then
    Keyboard:Alt+V,T,M
    Menu bar, including File, Edit, View, should appear
    Right-click the bookmark bar
    Click Customize... in the context menu.
    In the Customize Toolbar window which appears find the address bar (It will be shorter) amongst the buttons here.
    Drag the address bar by mouse onto the main window, where you want it to be.

  • Why can't I open links in a new tab with a right click anymore? And why has the toolbar removed the refresh button?

    Several basic functions seem to be have vanished from Firefox. I can no longer open links in new tabs with a right click, and the refresh browser button (and back/forward navigation buttons, etc) do not appear in with consistency anymore. How do I get these basic navigational tools back? (most recent updates are installed)
    == This happened ==
    Not sure how often
    == 7 July 2010

    * Make sure that you have the "Navigation Toolbar" and the "Bookmarks Toolbar" visible: "View > Toolbars"
    * If items are missing then see if you can find them in the "View > Toolbars > Customize" window
    * If you see the item in the Customize window then drag it back from the Customize window to one of the toolbars.
    * If, in "View > Toolbars > Customize", you do not see that item then click the "Restore Default Set" button
    See also [[Back and forward or other toolbar buttons are missing]] and [[Navigation Toolbar items]]
    See http://kb.mozillazine.org/Toolbar_customization

  • Stop with the right-click answers. Reload is still missing from my View menu.

    Please stop with the "right-click" solutions. I don't have a mouse that does a "right-click."
    Also, this forum is so hard to use I can't even find my original post so I am starting another one.
    How do I get the "reload" function back into my View menu? Please do NOT tell me to "right-click," that is of no use to me.

    Hi again pvitari, <br />Sorry you still have problems. Possibly you do not have the option as previously, but you do have workable options to reload webpages using mouse clicks.
    *Please confirm or explain ?
    <img src="https://support.cdn.mozilla.net/media/uploads/gallery/images/2012-01-03-13-00-12-3d6b4e.png">
    *Do you not have a curved blue arrow on the end of the address bar as shown in the above image ?
    Your icons may not look exactly like that and will possibly depend on any customising you may have done. The arrow is only available when appropriate and could be: a cross to stop loading, or an arrow to navigate to a site.
    See the article
    *[[Customize navigation buttons like back, home, bookmarks and reload]]
    #Do you have the curved blue arrow that you are able to click with a mouse to reload your webpage ?
    #Does F5 work to reload ?
    *Possibly if you attach a screenshot it will help us understand what you see <br /> [[How do I create a screenshot of my problem?]] <br /> [[How to make screenshots]]

  • I cannot save photos from a webpage with a right click. Why not?

    I cannot save photos from any webpage using a right click on Firefox, so I must open Internet Explorer to do that, yet my friend can do it on FF with his computer. Why is that?
    == This happened ==
    Every time Firefox opened
    == I installed firefox

    Issues with the right-click context menu not working can be caused by the [http://toolbar.yahoo.com/ Yahoo Toolbar] (Tools > Add-ons > Extensions)

  • Why I can't copy my address url with my right click. It's really strange.

    Since my installation I can't copy my address url with my right click or in whatever manner. I have tried with every site I have visited but the url is not copied.
    == This happened ==
    Every time Firefox opened
    == since my installation

    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")

  • Copying a table with the right-click menu in schema browser fails to copy comments when string has single quote(s) (ascii chr(39))

    Hi,
    I'm running 32-bit version of SQL Developer v. 3.2.20.09 build 09.87, and I used the built in context menu (right-clicking from the schema browser) today to copy a table.  However, none of the comments copied.  When I dug into the PL/SQL that the menu-item is using, I realized that it fails because it doesn't handle single quotes within the comment string.
    For example, I have a table named WE_ENROLL_SNAPSHOT that I wanted to copy as WE_ENROLL_SNAPSHOT_V1 (within same schema name)
    1. I right-clicked on the object in the schema browser and selected Table > Copy...
    2. In the pop-up Copy window, I entered the new table name "WE_ENROLL_SNAPSHOT_V1" and ticked the box for "Include Data" option.  -- The PL/SQL that the menu-command is using is in the "SQL" tab of this window.  This is what I extracted later for testing the issue after the comments did not copy.
    Result: Table and data copied as-expected, but no column or table comments existed.
    I examined the PL/SQL block that the pop-up window issued, and saw this:
    declare
      l_sql varchar2(32767);
      c_tab_comment varchar2(32767);
      procedure run(p_sql varchar2) as
      begin
         execute immediate p_sql;
      end;
    begin
    run('create table "BI_ETL".WE_ENROLL_SNAPSHOT_V1 as select * from "BI_ETL"."WE_ENROLL_SNAPSHOT" where '||11||' = 11');
    select comments into c_tab_comment from sys.all_TAB_comments where owner = 'BI_ETL' and table_name = 'WE_ENROLL_SNAPSHOT' and comments is not null;
    run('comment on table BI_ETL.WE_ENROLL_SNAPSHOT_V1 is '||''''||c_tab_comment||'''');
    for tc in (select column_name from sys.all_tab_cols where owner = 'BI_ETL' and table_name = 'WE_ENROLL_SNAPSHOT')
        loop
       for c in (select comments from sys.all_col_comments where owner = 'BI_ETL' and table_name = 'WE_ENROLL_SNAPSHOT' and column_name=tc.column_name)
       loop
       run ('comment on column BI_ETL.WE_ENROLL_SNAPSHOT_V1.'||tc.column_name||' is '||''''||c.comments||'''');
    end loop;
    end loop;
    EXCEPTION
      WHEN OTHERS THEN NULL;
    end;
    The string of the table comment on WE_ENROLL_SNAPSHOT is this:
    WBIG table of frozen, point-in-time snapshots of Enrolled Students by Category/term/pidm. "Category" is historically, and commonly, our CENSUS snapshot; but, can also describe other frequencies, or categorizations, such as: End-of-Term (EOT), etc. Note: Prior to this table existing, Census-snapshots were stored in SATURN.SNAPREG_ALL. All FALL and SPRING term records prior-to-and-including Spring 2013 ('201230') have been migrated into this table -- EXCEPT a few select prior to Fall 2004 (200410) records where there are duplicates on term/pidm. NO Summer snapshots existed in SNAPREG_ALL, but were queried and stored retroactively (including terms prior to Spring 2013) for the purpose of future on-going year-over-year analysis and comparison.
    Note the single quotes in the comment: ... ('201230')
    So, in the above PL/SQL line 11 grabs this string into "c_tab_comment", but then line 12 fails because of the single quotes.  It doesn't know how to end the string because the single quotes in the string are not "escaped", and this messes up the concatenation on line 12.  (So, then no other column comments are created either because the block throws an error, and goes to line 22 for the exception and exits.)
    When I modify the above PL/SQL as my own anonymous block like this, it is successful:
    declare
      c_tab_comment VARCHAR2(32767);
    begin
    SELECT REPLACE(comments,chr(39),chr(39)||chr(39)) INTO c_tab_comment FROM sys.all_TAB_comments WHERE owner = 'BI_ETL'   AND table_name = 'WE_ENROLL_SNAPSHOT'  AND comments IS NOT NULL;
    EXECUTE IMMEDIATE 'comment on table BI_ETL.WE_ENROLL_SNAPSHOT_V1 is '''||c_tab_comment||'''';
    for tc in (select column_name from sys.all_tab_cols where owner = 'BI_ETL' and table_name = 'WE_ENROLL_SNAPSHOT')
        loop
       for c in (select REPLACE(comments,chr(39),chr(39)||chr(39)) comments from sys.all_col_comments where owner = 'BI_ETL' and table_name = 'WE_ENROLL_SNAPSHOT' and column_name=tc.column_name)
       loop
       EXECUTE IMMEDIATE 'comment on column BI_ETL.WE_ENROLL_SNAPSHOT_V1.'||tc.column_name||' is '||''''||c.comments||'''';
    end loop;
    end loop;
    EXCEPTION
      WHEN OTHERS THEN NULL;
    end;
    On lines 4 and 8 I wrapped the "comments" from sys.all_tab_comments and sys.all_col_comments with a replace command finding every chr(39) and replacing with chr(39)||chr(39). (On line 8 I also had to alias the wrapped column as "comments" so line 10 would succeed.)
    Is this an issue with SQL Developer? Is there any chance that the menu-items can handle single quotes in comment strings? ... And, of course this makes me wonder which other context menu commands in the tool might have a similar issue.
    Thoughts?
    thanks//jacob

    PaigeT wrote:
    I know about quick drop, but it isn't helpful here. I want to be able to right click on a string or array wire, navigate to the string or array palette, and select the corresponding "Empty?" comparator. In this case, since I do actually know where those functions live, and I'm already using my mouse to right click on the wire, typing ctrl-space to open quick drop and then typing in the function name is actually more work than navigating to it in the palette. It would just be nice to have it on hand in the location I naturally go to look for it the first time. 
    I don't agree with this work flow.  Right hand on mouse, left hand on home keys.  Pressing CTRL + Space is done with the left hands, and then you could assign "ea" to "Empty Array" both of which is accessible with the left hand.  Darren posted a bunch of great shortcuts for the right handed developer.
    https://decibel.ni.com/content/docs/DOC-20453
    This is much faster than waiting for any right click menu navigation, even if it is found in the suggested subpalette.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Right click event on TABLE Cell

    Hi,
    I have a TABLE built on my webdynpro screen. Now the requirment is in the first column of the TABLE if the user right clicks on the cell a menu should come which has to be filled with custom menus.
    Please let me know how that can be acheived.
    Thanks
    Mahesh

    Hi,
    I think this can help? check this..
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3041fcd6-3833-2c10-efad-b545c6001553?quicklink=index&overridelayout=true
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/180c60c2e927d0e10000000a155369/content.htm
    Cheers,
    Kris.

  • JTable: Allowing the highlight of a row with a right click

    Hi, this is my first post here. I'm using a JTable to display data from a JDBC ResultSet and I added a popup menu to the JTable (activated with the PopupTrigger) to display options related to the selected row like DELETE, UPDATE, etc.
    But the problem is that if you right click (the PopupTrigger that MS Windows has) anywhere on the table the Pop Up shows even if you aren't right clicking over the selected row.
    What I want to do is to:
    * When I right click over a row on the JTable I want to highlight that row and then show the PopUp menu so it correctle performs the operation on the row the Menu is placed over.
    * Or another option is not to show the PopUp at all in case the cursor is not over the selected row.
    Anyway, the bottom line is that I need a way to know in which row of the JTable is the mouse over?
    Thanks in advance.

    Thanks my man! That was my missing piece!
    I also used the JTable.addRowSelectionInterval(clickedRow, clickedRow) to highlight the clicked row.
    10 Duke Dollars coming your way.
    class IFramePersons_jTablePerson_mouseAdapter
            extends java.awt.event.MouseAdapter
        IFramePersons adaptee;
        IFramePersons_jTablePerson_mouseAdapter(IFramePersons adaptee)
            this.adaptee = adaptee;
        public void mouseClicked(MouseEvent e)
            if(e.getClickCount() == 2)
                adaptee.jTablePerson_mouseClicked(e);
        public void mousePressed(MouseEvent e)
            maybeShowPopup(e);
        public void mouseReleased(MouseEvent e)
            maybeShowPopup(e);
        private void maybeShowPopup(MouseEvent e)
            if(e.isPopupTrigger())
                int clickedRow = adaptee.jTablePerson.rowAtPoint(e.getPoint());
                adaptee.jTablePerson.addRowSelectionInterval(clickedRow, clickedRow);
                adaptee.jPopupMenuRow.show(e.getComponent(), e.getX(), e.getY());
    }

  • Why can I no longer import photos to iphoto library from the internet with a right click?

    Why can i no longer import photos from the internet to my iphoto library with just a right click?

    There are 9 different versions of iPhoto and they run on seven different versions of the Operating System. The tricks and tips for dealing with issues vary from version to version and OS to OS. So before anyone can help, they need information to work with. Basic stuff:
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. What were you doing when the problem arose?
    - Did it ever work properly?
    - Are there error messages?
    - What steps have you tried already to solve the issue.
    Anything else you can think of that might allow someone else to understand your issue.
    With this kind of information somebody can develop a starting point for troubleshooting the issue.

  • Why can I no longer copy a word or phrase from a New York Times article with a right-click? To copy I have to go to the toolbar Edit|Copy.

    mouse right-click no longer allows me to select Copy of a word or phrase in a New York Times article. To copy I have to use the Firefox tool bar Edit|Copy.
    == URL of affected sites ==
    http://www.nytimes.com

    One or more of your add-ons could be affecting the right-click function. You did not list your extensions. Type '''about:support''' in your URL/location bar to see a list of your Extensions, modified preferences and other Firefox information.
    <u>'''Safe Mode'''</u>
    You may need to use '''[[Safe Mode]]''' (click on "Safe Mode" and read) to localize the problem. Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes <u>'''before'''</u> starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    See:
    '''[[Troubleshooting extensions and themes]]'''
    '''[[Troubleshooting plugins]]'''
    '''[[Basic Troubleshooting]]'''
    If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling <u>'''one at a time'''</u> until the problem reappears. <u>'''You MUST close and restart Firefox after EACH change'''</u> via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.
    <u>'''''Other Issues'''''</u>: ~~red:You have installed plug-ins with known security issues. You should update them immediately.~~
    <u>'''Install/Update Adobe Flash Player for Firefox'''</u>: your ver. 10.0 r32; current ver. 10.1 r53 ('''important security update 2010-06-10''')
    See: '''[http://support.mozilla.com/en-US/kb/Managing+the+Flash+plugin#Updating_Flash Updating Flash]'''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    -exit Firefox (File > Exit)
    -check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -double-click on the Adobe Flash installer you just downloaded to install/update Adobe Flash
    -when the Flash installation is complete, start Firefox, and test the Flash installation here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507&sliceId=1
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version of Flash. To install/update the IE ActiveX Adobe Flash Player, same instructions as above, except use IE to download the ActiveX Flash installer.
    *Also see: http://kb.mozillazine.org/Flash ~~red:'''''and'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]

  • Change the selection of tree control with a right click

    How is it possible to change the item selected in a tree control (LabVIEW7) with a mouse right click ?

    Filippo,
    Here is a popup menu toolkit, with an additional example for a listbox. If I
    understand your problem, it shouldn't be hard to change it to a tree
    control.
    Regards,
    Wiebe.
    "Filippo" wrote in message
    news:[email protected]..
    > Sorry for my english ! If you can send me an example, it could be very
    > useful for me.
    > My e-mail is : [email protected]
    > Thanks.
    > Regards,
    >
    > Filippo
    [Attachment Menu 042004.zip, see below]
    Attachments:
    Menu_042004.zip ‏175 KB

  • If Firefox is not the default browser is there anyway to create an "Open with Firefox" right click option for internet icons on the desktop??

    When internet icons on the desktop are right clicked and Firefox is not the default browser, is there anyway to create an "Open with Firefox" option in the right click menu? If not you should create one in future versions.

    You will have to create a copy of the Firefox desktop shortcut and add the URL to the target line if you want to open such an internet shortcut with Firefox.
    A normal internet shortcut will always open in the default browser.

  • How can I get the scroll bar to go to the top or bottom of the page with a right click command?

    When I right click on the scroll bar nothing happens. I have to spin the mouse wheel repeatedly to get to the top or bottom of the page. I just switched from explorer. I'm used to being able to do this. It's much less time consuming and frustrating. I hope someone can help. Thanks.

    You can hold down the Shift key and left-click the scroll bar to go to that position.
    If you set the Boolean pref <b>middlemouse.scrollbarPosition</b> to "<i>true</i>" (default on Linux) on the <b>about:config</b> page then you can middle-click the scroll bar to go to that position.
    *http://kb.mozillazine.org/middlemouse.scrollbarPosition
    *http://kb.mozillazine.org/ui.scrollToClick

  • Issues with the "right click" window not going away, unable to web browse

    Out of the blue, and at least 3-4 times a day, the "right click" pop up window will appear while I am web browsing, if I try to move the mouse , the window will continue to appear until I have to re boot.. Also, while it does this, sometimes it will make my screen pan in and out while moving the mouse.. Any ideas why this happens.. It's becoming quite annoying. BTW my browser is fire fox, and I have reinstalled it but it has not helped.
    Thanks

    Actually... thinking about it... it sounds like a sticky ctrl key on your keyboard
    The zooming in and out is when you hold ctrl and move the scroll ball
    the "right click" function (as on macs of old) is activated when ctrl+click-ing...
    Have a look around your keyboard, maby try another, see if the problem persists

Maybe you are looking for