Skip to main content



      Home
Home » Archived » Visual Editor (VE) » new class from jframe
new class from jframe [message #54427] Wed, 04 August 2004 08:26 Go to next message
Eclipse UserFriend
Originally posted by: khw.warnkoenig.de

Hi all,

if I create a new class with the visual editor there are some thing
mysterious.

1. Is it correct that ther is NO setVisible somewhere?
2. There is no MyFrametype myFrame = new MyFrametype() in the main method?
3. where must I put the JMenuBar on. On the frame (= this) or on the
jContendPane?

Thanks for help

Karl-Heinz

--
________________________
Warnk
Re: new class from jframe [message #54480 is a reply to message #54427] Wed, 04 August 2004 10:08 Go to previous message
Eclipse UserFriend
Originally posted by: myersj.nospam.us.ibm.com

Karl-Heinz,

To answer your questions:
1 - Yes, it is correct that there is no setVisible automatically
generated for you. This frame could be another frame in an application
rather than the initial, main frame. Feel free to set the visible
property to true on the property sheet.

2 - Yes, we don't put any code into the main method while working with
Swing or AWT. It's up to the user to decide how they want their
application to start. In SWT we auto-generate the event loop for you in
the main method if you chose to create a main method in the new Visual
Class wizard.

3 - In most cases, you should put the JMenuBar onto the JFrame.
JMenuBar is simply another Swing component, so it can be placed anywhere
a normal component could be, including within the content pane.

Hope this helps,

- Jeff

K-H Warnkönig wrote:

> Hi all,
>
> if I create a new class with the visual editor there are some thing
> mysterious.
>
> 1. Is it correct that ther is NO setVisible somewhere?
> 2. There is no MyFrametype myFrame = new MyFrametype() in the main method?
> 3. where must I put the JMenuBar on. On the frame (= this) or on the
> jContendPane?
>
> Thanks for help
>
> Karl-Heinz
>
> --
> ________________________
> Warnkönig Elektronik
>
> Karl-Heinz Warnkönig
> Im Weinberg 3
> 88709 Meersburg
>
> tel. 07532 5432
> fax. 07532 2484
>
>
Re: new class from jframe [message #596716 is a reply to message #54427] Wed, 04 August 2004 10:08 Go to previous message
Eclipse UserFriend
Karl-Heinz,

To answer your questions:
1 - Yes, it is correct that there is no setVisible automatically
generated for you. This frame could be another frame in an application
rather than the initial, main frame. Feel free to set the visible
property to true on the property sheet.

2 - Yes, we don't put any code into the main method while working with
Swing or AWT. It's up to the user to decide how they want their
application to start. In SWT we auto-generate the event loop for you in
the main method if you chose to create a main method in the new Visual
Class wizard.

3 - In most cases, you should put the JMenuBar onto the JFrame.
JMenuBar is simply another Swing component, so it can be placed anywhere
a normal component could be, including within the content pane.

Hope this helps,

- Jeff

K-H Warnkönig wrote:

> Hi all,
>
> if I create a new class with the visual editor there are some thing
> mysterious.
>
> 1. Is it correct that ther is NO setVisible somewhere?
> 2. There is no MyFrametype myFrame = new MyFrametype() in the main method?
> 3. where must I put the JMenuBar on. On the frame (= this) or on the
> jContendPane?
>
> Thanks for help
>
> Karl-Heinz
>
> --
> ________________________
> Warnkönig Elektronik
>
> Karl-Heinz Warnkönig
> Im Weinberg 3
> 88709 Meersburg
>
> tel. 07532 5432
> fax. 07532 2484
>
>
Previous Topic:new class from jframe
Next Topic:Tutorials for VE
Goto Forum:
  


Current Time: Thu May 08 09:28:09 EDT 2025

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

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

Back to the top