|
Re: a Labell is never added to JPanel. Is that right? [message #63558 is a reply to message #63534] |
Thu, 30 September 2004 20:49 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
David Bo Jensen wrote:
> Hi,
> Eclipse-sdk-3.0.1-win32
> EMF SDK 2.0.1
> GEF SDK 3.0.1
> VE SDK 1.0.1
>
> Here is what I did
> 1) I created a "visual class" by clicking on the menu. The superclass was
> javax.swing.JFrame
> That created a JFrame with a JPanel according to the generated source code.
> Why is a JPanel added?
Because JFrame's require a content pane. The JPanel is the content pane.
(Note: Currently we can't handle implicit children. In other words we
can't handle the fact that JFrame already has a content pane, so we need
to explicitly create one).
>
> 2) Then I added with the mouse a JLabel to the JPanel but that is not
> reflected in the generated source code. See below. Is that a fault?
> If I save and close and reenter into eclipse, I can no longer see my label.
You didn't add it to the JPanel. It looks like you dropped it on the
freeform (the white area) and not the JPanel.
--
Thanks,
Rich Kulp
|
|
|
|
Re: a Labell is never added to JPanel. Is that right? [message #63602 is a reply to message #63580] |
Thu, 30 September 2004 21:00 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
No that is not right. When you create a subclass of JFrame, you should
at least see the JFrame on the white surface. Then inside the JFrame,
assuming it has been sized large enough, will be the content pane. The
content pane is typically gray. You would drop the JLabel there on the
gray content pane. If everything is white then something is wrong.
--
Thanks,
Rich Kulp
|
|
|
|
|
|
Re: a Labell is never added to JPanel. Is that right? [message #600269 is a reply to message #63534] |
Thu, 30 September 2004 20:49 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
David Bo Jensen wrote:
> Hi,
> Eclipse-sdk-3.0.1-win32
> EMF SDK 2.0.1
> GEF SDK 3.0.1
> VE SDK 1.0.1
>
> Here is what I did
> 1) I created a "visual class" by clicking on the menu. The superclass was
> javax.swing.JFrame
> That created a JFrame with a JPanel according to the generated source code.
> Why is a JPanel added?
Because JFrame's require a content pane. The JPanel is the content pane.
(Note: Currently we can't handle implicit children. In other words we
can't handle the fact that JFrame already has a content pane, so we need
to explicitly create one).
>
> 2) Then I added with the mouse a JLabel to the JPanel but that is not
> reflected in the generated source code. See below. Is that a fault?
> If I save and close and reenter into eclipse, I can no longer see my label.
You didn't add it to the JPanel. It looks like you dropped it on the
freeform (the white area) and not the JPanel.
--
Thanks,
Rich Kulp
|
|
|
|
Re: a Labell is never added to JPanel. Is that right? [message #600290 is a reply to message #63580] |
Thu, 30 September 2004 21:00 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
No that is not right. When you create a subclass of JFrame, you should
at least see the JFrame on the white surface. Then inside the JFrame,
assuming it has been sized large enough, will be the content pane. The
content pane is typically gray. You would drop the JLabel there on the
gray content pane. If everything is white then something is wrong.
--
Thanks,
Rich Kulp
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07009 seconds