Home Java Java-tips GUI Layouts Ezpanel FormatPanel Tutorial

Ask Questions?

View Latest Questions


 
 

FormatPanel Tutorial
Posted on: July 26, 2006 at 12:00 AM
About the FormatPanel

Java: FormatPanel Tutorial

Learn how to create FormatPanel example in Java Swing.

For this example we have used JTextField.

We created two objects of JTextField as shown below:

 

// Create components first.
JTextField fnField = new JTextField(15);
JTextField lnField = new JTextField(15);
...

 

 

Example 1

To start let's produce a simple example, a label and a text field that looks like this.

 

The entire program that produces this is shown below.

 

This is the only example that shows an entire program.

 

Later examples will show the format, and perhaps the components.

// Create components first.
JTextField fnField = new JTextField(15);
JTextField lnField = new JTextField(15);
...
FormatPanel content = new FormatPanel(
              "'First Name' $x / 'Last Name' $"
              , new Component[] {fnField, lnField});
Copyleft 2004 Fred Swartz MIT License

Related Tags for FormatPanel Tutorial:
ccomormtextformcomponentsformatlabelexamplescomponentfieldthistarsimplestartshowtexforieexampleprogramtoramexamldwsshexteilpeimartcermstamntpsleteshowproxaxampsstaratlateisirhallmplduandarrtsimxtssthshobelostababelaphatpleplprodprndonlyonomogronl