JMenuItems in JPopMenu are not highlighted

Hi,
In my application I have a JPopMenu added to a JPanel when I right click the JPopMenu appears and you can select JMenuItem's in it, but there is no graphical feedback like in a standard JMenu. I mean when the mouse hovers over a JMenuItem it does not change color/become selected.
I had to extend the MouseAdapter class as shown
                 public void mouseClicked(MouseEvent e){
                * A workaround because e.isPopUpTrigger is
                * not recognising that right click is a popup trigger
                         * NOTE: this is system(mouse) specific
               if(e.getButton() == MouseEvent.BUTTON3){
                    //set the location of the popup menu
                    pop.setLocation(e.getX(), e.getY());
                    //make the popup menu visible
                    pop.setVisible(true);
               else{
                    //if the popup menu is visible
                    if(pop.isVisible()){
                         //hide menu
                         pop.setVisible(false);
          private void checkTrigger(MouseEvent e){
               if(e.isPopupTrigger()){
                    System.out.println("Is Trigger");
          }Also does anyone know why e.isPopupTrigger is returning false when I right click, I am using windows so I assume this should work.

Hi there
I had the same trouble with the color of the items in the popup menu. To fix it, I made a component that extends the JMenuItem called JMouseMenuItem that I added to the popup. Then in the JMouseMenuItem, I have a MouseListener which does this...
public void mouseEntered(MouseEvent e){
          setBackground(UIManager.getColor("MenuItem.selectionBackground"));
          setForeground(UIManager.getColor("MenuItem.selectionForeground"));
     public void mouseExited(MouseEvent e){
          setForeground(Color.BLACK);
          setBackground(UIManager.getColor("Panel.background"));
     }[\code]
It works great now.
Cheers,
Rachel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Spelling Errors In Mail Are Not Highlighted As I Type

    Hi,
    I have 'Check Spelling As I Type' enabled in Preferences in Mail, however my spelling errors are not highlighted (underlined in red) as I type.
    This feature used to work but for some reason no longer does - not sure if this is attributable to recent software updates?
    To check the spelling I need to select that option from the Edit menu.
    Any ideas how to turn this feature back on.
    Thanks

    Are your dictionary files in place? They should be here:
    ~/Library/Spelling
    Maybe check that the permissions are OK on this file (do a Repair Permissions from Disk Utility).
    Also, check your spelling settings in Mail: Go to Edit->Spelling->Spelling...
    Finally, several other applications use the same spelling services as Mail, so try using Text Edit to see if the problem is there too.

  • Some words are not highlighting on my read-aloud epubs after updating IOS 6.0.1 and iBooks 3.0.1

    Some words are not highlighting on my read-aloud epubs after updating IOS 6.0.1 and iBooks 3.0.1 on both my iPad 2 and iPad 3. They are working absolutely fine earlier. I even updated the latest version of iBooks 3.0.2 but nothing is working. Can anybody help?

    Hi spati,
    I ran into this problem as well.  Seems like something funky going on with iBooks 3.  Anyways, I had to tweak my read-aloud clip starts in the smil.  Where the word was not highlighting, I added a few milliseconds to the timing until the word started highlighting again.  Not the most ideal solution, and not sure what exactly causes it because 90% of the words were just fine, but it seemed to fix the problem.  Note prior to the problem happening, I had all my clip start timings = clip end timings for the previous word, so there were no gaps.
    Regards,
    Tim

  • I downloaded 10.5.1 now I cannot open libraries from my external hardrive.  They are not highlighted when I open using the Option key

    I downloaded 10.5.1 now I cannot open libraries from my external hardrive.  They are not highlighted when I open using the Option key

    Hello, when you try Tylerdowner's reply make sure that you '''do not install Firefox using a limited Windows XP account''', you need sp2 and above in your xp.
    thank you

  • Unread mails are not highlighted

    Unread mails are not highlighted (colored)

    Yes, you are correct. Unread messages are not highlighted.
    The only option that exists is to make unread messages Bold.

  • Query results are not highlighted ?

    Hi
    I have made CO query "Cost Center", when i expand hierachy i my sumary results are not highlighted.
    I have the same query for "Cost Elements" an everything is ok, summary results are highlighted.
    Any idea what is wrong ?
    Regards

    On each level of hierarchy there are results, but no highlight on them.
    see this print screens http://picasaweb.google.pl/w.lukasz/Costs?authkey=Gv1sRgCJ3JxOH_h6f2_QE#
    in "cost elements" on screens there is "yellow" highlight
    but in "cost center" there is NO highlight.
    That is the problem, any idea ?
    THX
    Regards

  • Whenever I am asked to upload a photo or an attachment from a web site the words are not highlighted and so I cannot upload

    Whenever I am asked to upload an photo on my iPad
    The word upload is not highlighted and I am unable to upload or attach an image ?

    Which os version are you using?  Which browser? 
    Solution may be found if you search in the "More Like This" section over in the right column.

  • What happened to my back button? Now when I'm browsing on facebook, or any other site, the back/forward buttons are not highlighted to be able to use them?

    When I am surfing the net, I have always been able to use my back/forward buttons. Now all of a sudden, they are not available to use, you can still see them, but they are grey, not black, like they once were so that I could click them to go back to a previous page, or forward once I've went back? I don't know what's the problem. I did the most recent firefox update that was sent to me recently. But just noticed this problem today. Thanks for your help.

    A possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Toolbar options are not highlighted

    I need to resize an document but the resize option in Preview is not highlighted. Has anyone else expeienced an issue like this ? Any advice ?

    It's probably not an image (like JPG, PNG, TIF, GIF) but a PDF. You cant resize those, typically.

  • HTML5 SharePoint Publishing - Hyperlinks are not highlighted

    Hi,
    I am publishing few topics in SharePoint (2010) using RoboHelp 10. The topic has few links to other topics.
    After publishing, I find that couple of links are in blue text (and underlined) by default. But few links are  turning into blue (and underlined) only when the cursor is placed.
    Do we have any properties setup Or any stylesheet changes needed to display all the hyperlinks in blue text?
    Note : When the same project is published to a local folder, all links are displayed in blue text and underlined.
    Thanks,
    Nandha

    Please find the settings

  • Menu items are not highlighted after Design Studio Client 1.3 upgrade

    Hi expert I used DS_CLIENT00_0-20011685 patch to update my client. After update I do not see the menu items.
    Please help with this.Below is the screen.

    Hi,
    if this is what you see after start, it it is possible that you face a general issue on Java Runtime level (which version do you have installed)? or on memory allocation level.
    do you see any log file located in your workspace? search for *.log. can be that there are some basic exceptions.
    also, I do not know if this is upgrade or fresh install.. you can try to uninstall, delete the content of the folder under C:\Program Files (x86)\SAP BusinessObjects\Design Studio\... and then install from scratch again. could be that the upgrade went wrong.
    Regards, Karol

  • My ipod touch 5 won't let me update my apps when i click on update it just opens the app. also the update all words are not highlighted so I can't click on that

    my ipod touch 5 won't let me update my apps, when I click on update it just opens the app. also the update all at the top isn't  highlighted so I can't click on that.

    Try turning it off for 20 seconds and then on

  • HT4759 I recently replaced my phone and in settings, the accounts, i.e., icloud, hotmail, are not highlighted

    Can someone tell me what to do to get my icloud and hotmail settings correct on a new phone.

    Hello skaadland,
    Congratulations on your new iPhone.  I found steps that can help troubleshoot setting up email on your iPhone:
    iPhone - Setting up Mail Assistant
    http://www.apple.com/support/iphone/assistant/mail/
    You can skip any steps you have already gone through in this tutorial.  I hope this helps you get back on track with your new iPhone.
    Best,
    Sheila M.

  • When I go into my email account through Safari, I cannot see all of my messages.  26 may show on the screen but it says I have 32.  However, at the bottom right it appears as if all the messages are showing and the arrow to get more is not highlighted.

    When I go to my email account through Safari, I cannot see all of my messages.  It says there are 34 but I can only see 26.   However, at the bottom right  the arrows to go to the next screen are not highlighted?  I also cannot scroll any further down.  Does anyone know how to scroll down to see all of my messages?  I use Travel-net Communications as my email provider (Ottawa, On, Canada).

    hey ,
    if it is showing you 34 mails them it is correct. when you see your mail. apple has a smart way of arranging your mail.suppose you recieve 4 mails from one email id it will show you under one highlighted mail. so when you open a mail from anyone trying scrolling it down and you will find your missing mails.

  • Topics in TOC are not being published in Word output

    Windows 7
    RoboHelp 9.0.2.271
    Word 2010
    I am having an on again/off again problem with RH not publishing all topics.
    The topics are in the RH TOC and when I double-click them while in RH, they open for editing.
    However, when I publish these same topics, they are not in the Word document--although they are in the web help.
    Previous fixes include rebuilding the TOC (groan) or finding that rogue piece of code that causes topics not to print in Word or web help.
    Question 1:  Does anyone know why this is happening?
    Question 2:  Short of manually comparing RH TOCs against Word and web help (for 13 books), does anyone have any ideas on how to ensure all topics are included in the output?
    Thanks in advance for any help.
    Mary

    There's a common misconception that what is in your TOC gets published.
    The TOC is used the first time you generate a printed document. Thereafter, there is no update for good reason, you may want different topics. To update to what is in the TOC you need to click the Left arrow to clear everything from the right pane, then click the right arrow to put the new version of the TOC across to the right.
    If you look at the current version of the TOC you will see some books on the left are not highlighted. That indicates there are topics in that book that are not on the right.
    See Printed Documentation on my site.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

Maybe you are looking for

  • Oracle Reports 11.1.2.0.0, [PDF:subset] failed.

    Hi Expert, Refer to document "How to Use Font Subsetting in Reports for PDF Output [ID 207711.1]" , setup font subset in Oracle Forms 11.1.2.0.0 failed. Copy simsun.ttf file to <ORACLE_HOME>/reports/fonts. Add <ORACLE_HOME>/reports/fonts directory to

  • Event repeat menu not showing up

    Some events on my calendar have the repeat option and others don't. I need to set birthdays and anniversaries, etc. as recurring, but the menu isn't on the event. Where did it go?

  • Low resolution in psd paintbrush image when moved to CS3

    We are putting together a yearbook and have made paint brush images with wet media brushes in psd and moved to indesign. When moved the appear very pixeled?  Not sure why? Any help?

  • It's possible not change  structure of existing report by adding  group ?

    Hello Everybody, I have to create new group in a report already existed . But every time I do it in Graphical Data Model, when apply in Report Wizard, The report changes completely with the position of columns and even the style of the report is modi

  • Problem in converting the date format in Second's place

    I am developing an application using OAF in JDeveloper. I have to pass the current date from my page to a quary to filter the data. I used the following: String PresentDate=this.getOADBTransaction().getCurrentDBDate().toString(); However it is sendin