Article View: borland.public.jbuilder.java.swing
Article #8481Re: How do I componentize some code in a class that extends JPanel...
From: David W. Taylor
Date: Mon, 28 Aug 2000 00:00
Date: Mon, 28 Aug 2000 00:00
56 lines
2195 bytes
2195 bytes
Thanks! That is a good hint and may be the answer. I will try it and report back. David "Greg Hamer" <ghamer@corp.netzero.net> wrote in message news:8oe36l$n2f9@bornews.borland.com... > Sounds like you are not calling pack() after adding all the children to > MYPanel. > > "David W. Taylor" <davidt@detayls.com> wrote in message > news:39a49222$1_1@dnews... > > Hi! > > > > I have a very nice little editor that I would like to use in six more > > places. > > > > The code is currently sitting inside a JInternalFrame but all of the > > important editor components are inside a single JPanel in the center of a > > Borderlayout, which comprises the main part of the view. > > > > The JPanel in question holds a JTabbedPane, which has two panels, where > the > > editing occurs. > > > > My first attempt here was to create my own subclass MYPanel of JPanel and > > move all the relevant code to that new class, but when I do that the > > instance of MYPanel that is now created is invisible and of zero size. > > > > The loading of the editor all works and I can open data and hear it arrive > > and see the reactions of menu items and toolbar buttons but obviously I > need > > to do something in MYPanel to cause the JPanel it extends to gain size and > > paint itself. > > > > Are there any super() calls that I need to worry about in MYPanel? To put > > it another way, is Swing calling MYPanel to do something that MYPanel is > > ignoring? > > > > Thanks in advance for any advice or samples that you may have. > > > > David > > > > -- > > David W. Taylor, Detayls > > > > > > > >
Technical Details
Message-ID:
<39ab5a6f$1_1@dnews>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39a49222$1_1@dnews> <8oe36l$n2f9@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,54e65f6f18d18fd7 X-Google-Attributes: gid111d45,public From: "David W. Taylor" <davidt@detayls.com> Subject: Re: How do I componentize some code in a class that extends JPanel... Date: 2000/08/28 Message-ID: <39ab5a6f$1_1@dnews> X-Deja-AN: 663785061 References: <39a49222$1_1@dnews> <8oe36l$n2f9@bornews.borland.com> X-Trace: 28 Aug 2000 23:38:39 -0800, 216.15.88.178 Newsgroups: borland.public.jbuilder.java.swing X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400