Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Added JTable to JFrame... now can't add other components
Added JTable to JFrame... now can't add other components [message #113261] Thu, 15 December 2005 03:40 Go to next message
Eclipse UserFriend
Originally posted by: stjohnsoftware.yahoo.com

Using the Visual Editor, I added a JTable to a JFrame. I added it to the
"Center". However, after doing this, I cannot add any other components to
the JFrame.

Is this due to something I'm doing wrong or a misunderstanding on my part of
how JTables & JFrames work?
Re: Added JTable to JFrame... now can't add other components [message #113304 is a reply to message #113261] Thu, 15 December 2005 04:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stjohnsoftware.yahoo.com

I found the problem.

It looks like the generated code was setting the content pane
(JFrame::setContentPane()) to the JScrollPane instance rather than adding it
(JFrame::add())

Sorry, obviously a newbie here -- to both Swing & VE


"sjs" <stjohnsoftware@yahoo.com> wrote in message
news:dnqoo5$7br$1@news.eclipse.org...
> Using the Visual Editor, I added a JTable to a JFrame. I added it to the
> "Center". However, after doing this, I cannot add any other components to
> the JFrame.
>
> Is this due to something I'm doing wrong or a misunderstanding on my part
> of how JTables & JFrames work?
>
Re: Added JTable to JFrame... now can't add other components [message #113328 is a reply to message #113304] Thu, 15 December 2005 14:34 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You do not add to the JFrame itself. That is invalid. You must add only
to the content pane. If it doesn't already have a content pane you
should use the context menu on the JFrame and select the create content
pane menu item. then you can drop on the content pane.


> I found the problem.
>
> It looks like the generated code was setting the content pane
> (JFrame::setContentPane()) to the JScrollPane instance rather than adding it
> (JFrame::add())
>
> Sorry, obviously a newbie here -- to both Swing & VE
>

--
Thanks,
Rich Kulp
Re: Added JTable to JFrame... now can't add other components [message #611612 is a reply to message #113261] Thu, 15 December 2005 04:06 Go to previous message
Eclipse UserFriend
Originally posted by: stjohnsoftware.yahoo.com

I found the problem.

It looks like the generated code was setting the content pane
(JFrame::setContentPane()) to the JScrollPane instance rather than adding it
(JFrame::add())

Sorry, obviously a newbie here -- to both Swing & VE


"sjs" <stjohnsoftware@yahoo.com> wrote in message
news:dnqoo5$7br$1@news.eclipse.org...
> Using the Visual Editor, I added a JTable to a JFrame. I added it to the
> "Center". However, after doing this, I cannot add any other components to
> the JFrame.
>
> Is this due to something I'm doing wrong or a misunderstanding on my part
> of how JTables & JFrames work?
>
Re: Added JTable to JFrame... now can't add other components [message #611617 is a reply to message #113304] Thu, 15 December 2005 14:34 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You do not add to the JFrame itself. That is invalid. You must add only
to the content pane. If it doesn't already have a content pane you
should use the context menu on the JFrame and select the create content
pane menu item. then you can drop on the content pane.


> I found the problem.
>
> It looks like the generated code was setting the content pane
> (JFrame::setContentPane()) to the JScrollPane instance rather than adding it
> (JFrame::add())
>
> Sorry, obviously a newbie here -- to both Swing & VE
>

--
Thanks,
Rich Kulp
Previous Topic:Package Scope
Next Topic:A specific JRE version for projects?
Goto Forum:
  


Current Time: Tue Mar 19 10:47:05 GMT 2024

Powered by FUDForum. Page generated in 0.02668 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top