Article View: comp.lang.java.api
Article #17Re: SWING, layout relationship problem, how do i fix this sample?
From: Henrik Dahl Hansen
Date: Thu, 25 Nov 1999 00:00
Date: Thu, 25 Nov 1999 00:00
24 lines
1733 bytes
1733 bytes
Henrik Wahlberg wrote: > > Hi. > > I'm trying to make i combo panel similar to the tabpane, but with the tabs replaced by a Combobox. > To achieve this I have subclassed a JPanel, called PDropDownPane. In this I setup a borderlayout, and add a combobox in the top (NORTH) and a cardlayout in CENTER. > > To test it, I add this panel to a JFrame center, and add an "ADD" button on the NORTH border, to test adding panels dynamically. This snip is placed in DDTest.java. > > The problem is, that the combobox gets overlayed (most of the time) by the cardpane layout, which then leaves a blank(gray) area in the SOUTH border region, same height as the combobox or the ADD button. > > Before loosing all of my hair, please look at my code?? > > Is there a tool to visualize the "window" relationship ?. On MS Windows i had a tool to do this kind of spying, but I belive it's no good for swing. Hi Henrik, Your code's ok, just remove the getComponent() method. Regards Henrik Dahl Hansen IBM Denmark hdh_NS@dk.ibm.com (remove _NS to reply)
Technical Details
Message-ID:
<383D128B.33F36E7C@dk.ibm.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<383C2AC5.62719436@herning.mail.telia.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9a23,8b919f0df6571ed8 X-Google-Attributes: gidf9a23,public X-Google-Thread: fecd1,8b919f0df6571ed8 X-Google-Attributes: gidfecd1,public From: Henrik Dahl Hansen <hdh@dk.ibm._NS_> Subject: Re: SWING, layout relationship problem, how do i fix this sample? Date: 1999/11/25 Message-ID: <383D128B.33F36E7C@dk.ibm.com> X-Deja-AN: 552879959 Content-Transfer-Encoding: 7bit References: <383C2AC5.62719436@herning.mail.telia.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: IBM Danmark Mime-Version: 1.0 Newsgroups: comp.lang.java.api,dk.edb.programmering.java