Article View: borland.public.jbuilder.java.swing
Article #11678Re: JComboBox question
From: Bob Hoeppner
Date: Sun, 18 Apr 1999 00:00
Date: Sun, 18 Apr 1999 00:00
29 lines
1651 bytes
1651 bytes
I may have had the same problem. I tried a JComboBox on both a BevelPanel and a JPanel and it didn't respond to either a manual dropdown click or showPopup in code, although I knew that the ComboBoxModel was successfully adding the items. I had the panels on the Decorated Frame using the BorderLayout which JBuilder generates when adding the menubar, statusbar and toolbar (in response to the check boxes when creating a new application.) I tried putting a JComboBox in a bare-bones test app and it worked fine. I noticed that its height constraint was set to -1 and that it was on a JFrame. I was able to get the JComboBox to work on my original app by extending from JFrame and using the XYLayout. The JPanel (also using the XYLayout) is added to the JFrame, with the JComboBox added to the JPanel. There may be an easier way, but it works for now. Hope this helps. Alexis Rios wrote in message <7elnmi$4tt8@forums.borland.com>... >Why when I add an item to the JComboBox the item does not appear after is >added. > >Example: > >String s = JlblOne.getText(); >JcboFound.addItem(s); > >The item is supposed to be added but does not appear on the combo when I >click on it. > >Help > >
Technical Details
Message-ID:
<uBoVnVZi#GA.306@upnetnews05>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7elnmi$4tt8@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,4cc2568a011ad4de X-Google-Attributes: gid111d45,public From: "Bob Hoeppner" <bobahop@email.msn.com> Subject: Re: JComboBox question Date: 1999/04/18 Message-ID: <uBoVnVZi#GA.306@upnetnews05> X-Deja-AN: 467915896 References: <7elnmi$4tt8@forums.borland.com> Newsgroups: borland.public.jbuilder.java.swing X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0