// ////////////////////////////////////////////////////////
//
// J_SelfLayout.java
//
// ////////////////////////////////////////////////////////
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class J_SelfLayout extends JFrame
{
public static void main( String args[] )
{
J_SelfLayout app = new J_SelfLayout( );
app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
} // End of method: main
public J_SelfLayout( )
{
super("DiagonalLayout Example");
Container cp = getContentPane( );
J_DiagonalLayout t= new J_DiagonalLayout( );
cp.setLayout( t );
for(int i = 0; i < 5; i++)
{
String s= "Button " + (i+1);
JButton b = new JButton( s );
cp.add(b);
} // End of loop: for
setSize(320, 200);
setVisible(true);
} // End of constructor: J_SelfLayout
} // End of class: J_SelfLayout