All pastes #747286 Raw Edit

Something

public text v1 · immutable
·published 2007-10-23 21:49 UTC
rendered paste body
import java.awt.*;
import javax.swing.*;



public class test2 {
   public test2() {
      JFrame myFrame = new JFrame( "Address Information" );
      myFrame.setLocation( 200 , 300);
      myFrame.setResizable(false);

      JPanel centerPanel = new JPanel( new FlowLayout(FlowLayout.LEFT,15,15));

      centerPanel.add( new JLabel( "First name" ) );
      centerPanel.add( new JTextField() );
      centerPanel.add( new JLabel( "Last name" ) );
      centerPanel.add( new JTextField() );
      centerPanel.add( new JLabel( "Street Address" ) );
      centerPanel.add( new JTextField() );
      centerPanel.add( new JLabel( "City" ) );
      centerPanel.add( new JTextField() );
      centerPanel.add( new JLabel( "State" ) );
      centerPanel.add( new JTextField() );
      centerPanel.add( new JLabel( "Zip code" ) );
      centerPanel.add( new JTextField() );
      centerPanel.add( new JLabel() );
      centerPanel.add( new JLabel() );


      myFrame.getContentPane().add( centerPanel, "Center" );

      JPanel bottomPanel = new JPanel();

      bottomPanel.add( new JButton( "Enter" ) );
      bottomPanel.add( new JButton( "Cancel" ) );

      myFrame.getContentPane().add( bottomPanel, "South" );

      myFrame.pack();
      myFrame.show();

    }

   public static void main(String[] args) {
      test2 temp = new test2();
   }
}