On Feb 12, 11:46 am, Nigel Wade <n...@ion.le.ac.uk> wrote:
phillip.s.pow...@gmail.com wrote:
I'm afraid I cannot provide you with anything except the entire .java
file for you to see the problem which I discovered on Friday.
As it appears to be, any Component containing the
org.jdesktop.jdic.browser.WebBrowser object instance causes any other
component to lose resizing capabilities. I was able to verify that
the JComboBox was fully functional and working (when I stripped it
down to a single JPanel and discovered the JComboBox was fine all
along; added an additional empty JPanel, JComboBox worked; added a
JButton to second JPanel, JComboBox worked; the moment I added the
org.jdesktop.jdic.browser.WebBrowser into the second JPanel the first
JPanel was "blocked" and thus the JComboBox, while fully populated
(this proven by performing debug System.out.println statements on it
to prove it was dynamically populating correctly) was unviewable.
Solution: stop using org.jdesktop.jdic.browser.WebBrowser or insert a
"buffer JPanel" between the two panels to allot for resizing issues
with WebBrowser.
Phil
I was curious what you meant by "blocked". I had no idea what the
org.jdesktop.jdic.browser.WebBrowser actually was so I did some googling and
located and downloaded the jar file for it. I setup a simple JFrame very much
as you explained your layout to see what was going on.
I now think I know what the problem is. The description athttp://java.sun.com/developer/JDCTechTips/2005/tt0505.htmlsays that WebBrowser
is based on awt.Canvas, which is a heavy-weight component. This is obscuring
the Swing components, when the JComboBox is activated the pop-up list is
obscured by the Canvas. I don't know enough about how Swing and AWT interact to
offer a solution, hopefully someone else will be able to offer some assistance.
Thank you for the translation, I honestly couldn't explain it any
better, since I still don't know what "lightweight" and "heavyweight"
mean except in boxing. :(
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : n...@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
browser.