Article View: borland.public.jbuilder.java.swing
Article #8192Re: URGENT: Break Out Panel Into NEW Frame???
From: Greg Hamer
Date: Thu, 12 Oct 2000 00:00
Date: Thu, 12 Oct 2000 00:00
38 lines
2105 bytes
2105 bytes
So the JTabbedPane is in some other window besides the one that you add the lineEditor to? Did you try calling validate on the the JFrame after adding the component? "Nikolaos Giannopoulos" <nikolaos@solmar.ca> wrote in message news:39A536B5.D019D689@solmar.ca... > Anyone know why the following code won't work: > > JFrame newFrame = new > JFrame(jTabbedPane1.getTitleAt(jTabbedPane1.getSelectedIndex())); > FileEditorPane lineEditor = (FileEditorPane) > jTabbedPane1.getSelectedComponent(); > jTabbedPane1.removeTabAt(jTabbedPane1.getSelectedIndex()); > newFrame.getContentPane().setLayout(new GridLayout()); > newFrame.getContentPane().add(lineEditor); > Solmar.Utils.FrameTools.formatFrame(newFrame, true, 600, 500, true); > > Whereas the following will: > > FileEditorPane lineEditor = new FileEditorPane(); > newFrame.getContentPane().setLayout(new GridLayout()); > newFrame.getContentPane().add(lineEditor); > Solmar.Utils.FrameTools.formatFrame(newFrame, true, 600, 500, true); > > Basically I am taking a JPanel (which is what the FileEditorPane is at > its root) and trying to remove it from a JTabbedPane and then trying to > show it (the FileEditorPane) in a JFrame. Basically I get a blank > JFrame. > > It seems that once a component is added to a JTabbedPane that I can't > get it out without hosing the component OR that the component is not > displaying itself in the JFrame - I've tried using setVisible(true) on > the component to no avail. > > --Nikolaos > > >
Technical Details
Message-ID:
<39e5df8a$1_2@dnews>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39A536B5.D019D689@solmar.ca>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,9d3839a0657a8572 X-Google-Attributes: gid111d45,public From: "Greg Hamer" <ghamer@troikanetworks.com> Subject: Re: URGENT: Break Out Panel Into NEW Frame??? Date: 2000/10/12 Message-ID: <39e5df8a$1_2@dnews> X-Deja-AN: 680625885 References: <39A536B5.D019D689@solmar.ca> X-Trace: 12 Oct 2000 08:58:02 -0800, 12.31.172.193 X-MSMail-Priority: Normal X-Priority: 3 Newsgroups: borland.public.jbuilder.java.swing X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700