JpopupMenu with a JComboBox problem

Hi,
Well I need to make a popupMenu which contains a JComboBox, when I invoke the method show(, ,) of the popupMenu, everything looks fine.
But when I press on the comboBox to view its data, I can only see the drop list and the popupMenu disappears.
The problem occurs after that, when I try to choose a selection from the comboBox list, it also disappears without invoking the listener.
I believe it might be a focusing problem.
If anyone has a solution, I'd appreciate it??
Thanks & Regards,
ES_Coders

An other solution is to work use a BasicComboPopup
- import javax.swing.plaf.basic.BasicComboPopup -
It works quiet well
You can use a normal JComboBox for storing the entrys.
See the documentation of the class.
You should only watch for the add or remove methods. Those methods must be invoked on the JComboBox not on the BasicComboPopup.
Olek

Similar Messages

  • Probleme on JPopupMenu with JDialog

    I use JPopupMenu with JDialog. To display the popup, I use a mousePressed in a panel of the dialog:
    public void mousePressed(MouseEvent e) {
    if( e.getClickCount()==1 && e.getModifiers()==MouseEvent.BUTTON3_MASK && ga!=null ) {
         mpopup.show(e.getComponent(),e.getX(), e.getY());
    It works fine, but when a part of the popup is out of the dialog, the popup doesn't display.
    Is it normal?
    Has someone already had this problem?
    I work with jdk1.3.1_01
    Thanks for your help
    Templ

    When you create your popup menu do this :
    mpopup.setLightWeightPopupEnabled(false);
    I hope this helps,
    Denis

  • A strange problem found with the JCombobox???

    Hi All,
    A strange problem found with the JCombobox, its arrow button does not recognise any events (Mouse,Focus,Action ets.)
    My intention is when ever user clicks on the JCombox's arrow button load it with some values dynamically?
    I have tried it by initializing with values it still does not workl.
    I could solve this in JDK1.4 by using popupListner but I want it to work in JDK1.3.1_09.
    Any ideas on this would be great help..

    i don't really quite sure about my understanding about load dinamically...do you mean that you want to add value to combo box?and the first value will stay and never disappear?...well i haven't try that but...may be one of my suggestions work for you...
    but try these posibilities:
    1. look in the help docs...for JComboBox...find setEditable() method...try to use this method.
    2.look in the same page as 1...try to use append() method or add() method...i forgot about this...hehe...but the point is, find a method to add value to the JComboBox...
    sometimes, you have to set your combo to be editable before you're able to do something on it...but just try with or without that method...
    3.about the listener...mmm...have you add the combobox object to the listener you use?

  • Popup containing a JPanel with a JComboBox

    I like to get a Popup containing a JPanel with a JComboBox and some other stuff.
    There are two difficulties:
    - it is not possible to use a Combobox with a light weight popup. So I set combobox.LightWeightPopupEnabled(false). Otherwise the combobox popup won't be shown.
    - If the user changes the popups size (see code: this.getSize() returns a different dimension because of a new Frame size). The combobox popups won't be shown proper after a while.
    Does someone know, why it is not possible to use comboboxes with light weight popups?
    Does somebody know, how to fix the size problem?
    I am using JDK 1.4.1 for Windows Systems.
      private Popup getPopup(){
        if (popup != null) {
          hidePopup();
        Point p = this.getLocationOnScreen();
        Dimension inputSize = this.getSize();
        Dimension tableSize = tablePopup.getSize();
        if( ( p.y + tableSize.height ) < screenSize.height) {
          // will fit below input panel
          popup = factory.getPopup( this, tablePopup,
                                    p.x, p.y + (int)inputSize.height );
        } else {
          // need to fit it above input panel
          popup = factory.getPopup( this, tablePopup,
                                    p.x, p.y - (int)tableSize.height );
        return popup;

    Ok, it works proper with Windows L&F. So I replaced
    private PopupFactory factory =  PopupFactory.getSharedInstance();by
    private WindowsPopupFactory factory = new WindowsPopupFactory();

  • Strange JComboBox problem

    I have a weird JComboBox problem that has me stumped. I am dynamically changing the contents of a JComboBox after creation. When the change function is called it removes all existing contents from the JComboBox and then repopulates it. It is really straight forward. The strange thing is that it is working perfectly under Windows 2000 with JRE build 1.3.0, but with Windows XP I end up an empty JComboBox. I don't even know where to start debugging this. Any ideas?
    Thanks

    I notice the same problem... with no solution for the moment...

  • HT4356 My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    hi
    could you tell us what the other app is please

  • I have a an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes. All of the other movies on the card download with out a problem.

    I have an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes.
    All of the other movies on the card download with out a problem. The movie in question is not 'corrupt' as you can watch it in iMovie direct from the SD card but as soon as you try to import it, it  just says 'error'. iIve tried moving the file to an external drive ( and other variations on this theme) then importing but have had no luck.
    Can anyone please help me.

    The mystery remains....
    Thanks for the pointers. The file type is .mts (a proprietry sony one).
    I have now found some video converter software (Wondershare and iSkysoft) at a cost. Either will convert this file for me into .mp4. This I can then import into iMovie without any problems. I've checked this on the trial versions and it worked well but without paying am left with a giant watermark in the video
    The mystery (which I still havent solved) is why did 20 other .mts files import fine and then this one not?
    If you could point me in the direction of some free .mts converter software that would be the cherry on the cake.
    Thanks

  • I have the new ipad retina however i connect it to the wifi at work the signal comes and goes, especially as soon as i use an app that requires wifi, my iphone 4s is connected to the same network with no such problems, why is my ipad giving me these probl

    I have had my ipad retina for two and a half weeks but since the week end every time i connect to the wifi network it joins then disapears as soon as i open safari for example or just disappears at intermittent intervals....i have my iphone 4s connected to the same wifi network with no such problems.
    I have tried resetting the network settings to no avail
    Does anyone have any suggestions?
    Many thanks in advanced. 

    I have had my ipad retina for two and a half weeks but since the week end every time i connect to the wifi network it joins then disapears as soon as i open safari for example or just disappears at intermittent intervals....i have my iphone 4s connected to the same wifi network with no such problems.
    I have tried resetting the network settings to no avail
    Does anyone have any suggestions?
    Many thanks in advanced. 

  • Can someone help me with an iCloud problem when I take a picture with my iPhone 4s it some of the times go to my ipad2 but mostly it doesn't can anyone help me out

    Can someone help me with an iCloud problem when I take a picture with my iPhone 4s it some of the times go to my ipad2 but mostly it doesn't can anyone help me out

    I'm assuming you have Photo Stream set up of both devices.  However, it seems many users are experiencing the same as you - my take is that streaming photos is not foolproof yet.

  • Am I the only one with these various problems...??

    Hi all,
    I start my first post and introduction ever on this forum with a imposing problem with Aperture 3.03
    I just did the upgrade to Aperture 3 & 3.03. Coming off Aperture 2, I was able to rotate, crop and do all the things I wanted by just placing the pointer while clicking, holding, and moving all at the same time with no issues. With Aperture 3.03, no such luck. I've noticed that now if I want to rotate an image or even crop an image the first effort to move anything is ignored. It shows all the signs of being ready to move something, but nothing happens, nothing moves on first try. If I stop the click and place click the second time it is responsive as usual....What gives???
    Here is another issue. Cropping is all over the place and never right on the first try. Even if I have a set aspect ratio it does not provide me with the one I selected. I'm always getting the wrong aspect ratio even though the right one is selected. If I pick "Master Aspect Ratio", I get a variable ratio instead of a fixed ratio??? If I click again it changes again. This program is not stable!!
    One other thing has anyone noticed that you cannot use the arrow keys to move from one picture to another after editing the photo?? It is happening to me. If I complete an edit and want to move to the next photo, the program will not respond to key commands in any way. I'm forced to return to Browser mode and even then it seems hit or miss whether is responds to key commands again. navigating seems to be a big impediment when actively editing.
    So, am I the only one with these problems???
    Lets hear your story...
    Note: just installed the newest stability update for Snow Leopard/Aperture 3 just made available on August 18, 2010. No change...
    Steve,
    Bethlehem, Pa.
    Message was edited by: hdskullfire2

    I don't see any of these issues! You have listed several, disconnected issues. Perhaps you should pick one of them, and give us a blow-by-blow of your action steps.
    For rotation, click that button at the bottom of the View window, and then use one of the [ or ] bracket keys as listed for direction.
    Ernie

  • My iPhone 5 is not being recognized by my iMac.  All my other devices, including iPod and iPad are recognized with no sync problems.  I've tried every approach with online help as well as an Apple advisor by phone.  Help?

    My iPhone 5 is not being recognized by my iMac.  All my other devices, including iPod and iPad are recognized with no sync problems.  I've tried every approach with online help as well as an Apple advisor by phone.  Help?  Any other suggestions other than going to an Apple Store?

    Back to life**
    Oh I know there are many other vocabulary mistakes but never mind them I was just too excited when I wrote all of that while typing very quickly
    P.S: if you have any question then ask and please do tell me if it works or not with u but I'm definitely sure it'll work so tell me this and we'll get excited together
    Also if you have an experience to share then do share it as well please.
    Peace

  • Another New IPod Touch Owner with Wi-fi Problems

    Another New IPod Touch Owner with Wi-fi Problems.
    I have been working at this for about 4 hours now with no success and I am getting pretty frustrated, so if it show up in my typing please ignore it. I just don't understand why these multi-million dollar companies can't write a manual or put up a web site that can actually help someone with a problem.
    Ok, venting aside.
    I am running a gateway computer.
    Operating System = XP
    Router = Linksys WRT54G
    I have two other computers that are working fine with the existing wireless net work and have been for some time.
    I'm pretty good with my computer but haven't touched my router since initial set-up and all that was done was a basic set up.
    My I-pod is searching for a network and I'm three feet away from it but it doesn't find it.
    I printed out my wireless setting. I presume SSID name equals the name box on the ipod-touch
    Security = WEP
    What seems to be kicking my A$$ is the password. The route setting have never been changed so I would pesume the password should be the default "admin" which I put in (JOIN) and get the "Could not find network" screen
    So, I have perused this message board trying to discover and answer to mine, and and apparently many others question with no definitive results.
    So I guess what I and everybody else needs is a step by step how to guide on how to discover the info needed and enter in what we need to make this work.
    Thanks in advance to anybody that can actually help with this issue. A step by step do this would be nice.

    Thank you Terpfen for replying, and please excuse my ill temper earlier. I've calmed down some now.
    Step: 1 followed step one previously, Main screen, settings, Wi-Fi. Also set power down to 5 min to give I-Pod plenty of time to find network.
    Wi-Fi Network Screen.
    Wi-Fi ON
    Choose a Network (searching indicator) symbol spinning.
    Other ...
    Ask to Join Networks ON
    At this point the I-pod does not find any networks available. The indicator just spins but never returns any results. I am 3 feet for my WRT54G router.
    Hence the easy connect isn't connecting.
    The next step. is to manually set-up the connection.
    Main screen, setting, Wi-Fi, Other.
    press "Other" which brings up two fields
    Name __________
    Security ___________
    First Question? Which Name are they looking for. when I went to my router 192.168.1.1 It has the name linksys. However, when I go to my Wireless Network setting it has the name * ???? * which is different than Linksys router.
    Now, since one of the goals here is file sharing I presume I should be using the Wireless Network settings name. (which I have tried.)
    Next is security, Wireless Network setting indicate setting for WEP Once this is selected you then back-up to the "Enter Network Setting Screen" and you now have a password line added.
    Now I have never set a password for the router so the password for the router is the default Password "admin" And I don't recall ever setting a password for my network setting. But, I only use about three different passwords and a cycled through them still with no success.
    So, I need some expert advise on how and where to find the info to input into the required field to work or what I need to reset in my router to make this work.
    Thanks again for anyone who has constructive input to resolve my and probably many other peoples issues with this problem.

  • I want to go back to the previous 2014.2 version.  .3 is much too buggy and full of error messages. Creating problems as I am on a timeline with my client and I don't have time to fool around with all the problems.

    2014 .3 is much too buggy and full of error messages. Creating problems as I am on a timeline with my client and I don't have time to fool around with all the problems.

    You didn't mention what error(s) you've encountered? A workaround for the most commonly hit problem is here Re: error in Muse : Object UID:U6875 has two (or more) owners: U3633 and U3165
    If you have a copy of your .muse file that has not been saved using 2014.3, you can downgrade by uninstalling Muse and then choose Previous Version in the Filters drop down in the Apps panel of the Creative Cloud desktop app. There will be a popup next to Muse where you can select a prior version to install.

  • With IOS 7.0 How do you change the Color Red, that shows up on the Calendar to another color? People with certain eye problems cannot tolerate the color Red.

    How do you change the Color Red, that shows up on various points of the Calendar to another color? Persons with certain eye problems have visual irritations that can be caused by the color Red. This problem came up with the update to IOS 7.0.

    Sorry but you cant

  • I have a 160GB Hard Drive in my MBP and use VMWare Fusion and had a 60GB Virtual Machine running Windows XP. Deleted the Virtual Machine and CANNOT find the 60GB space I desperately need!  Anybody out there with a similar problem?  Help!

    I have a 160GB Hard Drive in my MBP and use VMWare Fusion and had a 60GB Virtual Machine running Windows XP. Deleted the Virtual Machine and CANNOT find the 60GB space I desperately need!  Anybody out there with a similar problem?  Help!

    Thanks - Of Course the first thing I checked and did.
    Disc Utility reads as follows:
    Capacity : 159.18 GB (159,182,127,104 Bytes)
      Format : Mac OS Extended (Journaled)  Available : 11.47 GB (11,472,896,000 Bytes)
      Owners Enabled : Yes  Used : 147.71 GB (147,709,231,104 Bytes)
      Number of Folders : 139,540  Number of Files : 511,832
    Activity Monitor(Disc Usage) shows something quite interesting.  Mac HD and Ramanan (Main User) - My hard drive is only 160GB!  Would the retired engineer gentleman please note as well.  Many thanks. Rams

Maybe you are looking for

  • Double click on OOPS grid

    Hi,     I have 3 grids , like the following code. SET HANDLER gr_event_handler->handle_double_click FOR o_grid.  "GT_SUM_COPA. SET HANDLER gr_event_handler->handle_double_click FOR o_grid2. SET HANDLER gr_event_handler->handle_double_click FOR o_grid

  • Always return "Image Object" in Toolkit.getDefaultToolkit().getImage();

    A : Image source = Toolkit.getDefaultToolkit().getImage("C:/aa.jpg"); B : Image source = Toolkit.getDefaultToolkit().getImage(""); generally, B may be null. but it is not null. so I look at "javax.swing.ImageIcon" class : <Part of ImageIcon source> p

  • D110 doesn't print PDF files correctly

    When printing from an email PDF attachment on an iPad, some of the lines are squeezed together and are illegible but most of the lines print perfectly.  Any suggestions? This question was solved. View Solution.

  • Cant get adobe to display on screen

    Cant get adobe to display on screen!   Anyone know?

  • Flash and search engines

    Where do I go for a discussion on how Google's failure to crawl flash sites is stifling development of rich internet applications?