/* Applet skeleton
* @author :
* Date :
*/
import javax.swing.*;
import java.awt.*;
public class Structure extends JApplet
{
// Declare all your variables HERE!
// this includes all your components!
public void init( )
{
// set up a layout manager here
doTitle( );
doLeftSide( );
doRightSide( );
doCenter( );
doBottom( );
}
public void doTitle( )
{
// add title at the top
}
public void doLeftSide( )
{
JPanel leftside = new JPanel( );
// set the layout manager for the left side
// set background color
// add components
// add this panel to the applet
}
public void doRightSide( )
{
JPanel rightside = new JPanel( );
// set the layout manager for the right side
// set background color
// add components
// add this panel to the applet
}
public void doCenter( )
{
JPanel center = new JPanel( );
// set the layout manager for the center panel
// set background color
// add components
// add this panel to the applet
}
public void doBottom( )
{
JPanel bottom = new JPanel( );
// set the layout manager for the bottom panel
// set background color
// add components
// add this panel to the applet
}
}
Back to Code Examples
©2006-
by E.S.Boese. All Rights Reserved