Thanks Enrico.
 
Will have a look.
 
Bertram.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]On Behalf Of Enrico Goosen
Sent: 29 March 2006 02:20
To: [email protected]
Subject: [CTJUG Forum] Re: Question - Java Swing Forms

Hi Bertram,

 

If you created Example.java in Netbeans, the chances are that the form extends javax.swing.JPanel or JFrame etc.

Additionally, the constructor will include a call to initComponents, which essentially creates the form.

 

If you want to incorporate Example.java into another JPanel or JFrame, you just need to construct it and add it to that component.

 

On your top level container (example: JFrame) you will need to call pack and show to set it visible.

 

If you need more info in Swing programming, you must check out: http://java.sun.com/docs/books/tutorial/uiswing/index.html

 

PS! In Netbeans you can also create custom components and add them to the Palette, so that they can be used during form design.

 

Regards,

Enrico

 

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of Bertram Julius
Sent: 29 March 2006 01:39 PM
To: [email protected]
Subject: [CTJUG Forum] Question - Java Swing Forms

 

Hi All.

 

This is probably a simple question.

 

Say you create a JSwing form using on one of these graphical form designers, now you sit with an xml file called Example.form and a java class called Example.java containing all the form elements.

 

The class file does not extend any of the components in the swing library.

 

How would you put that form on a different component without having to initialise all the form elements (name = new JTextField();), or set them visible, just displaying the form as is? Is there any good tutorials out there that might help?

 

Thanks.

Bertram.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
-~----------~----~----~----~------~----~------~--~---

Reply via email to