import javax.swing.UIManager;
import java.awt.*;

/**
 * Varsinainen ohjelma.
 */
public class ListComboApp
{
  /**
   * Luo ja rakentaa ohjelman
   */
  public ListComboApp()
  {
    ListComboFrame frame = new ListComboFrame();
    frame.validate();

    // keskittää ohjelman ruudun keskelle
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = frame.getSize();
    if ( frameSize.height > screenSize.height )
      frameSize.height = screenSize.height;

    if ( frameSize.width > screenSize.width )
      frameSize.width = screenSize.width;

    frame.setLocation( ( screenSize.width - frameSize.width ) / 2, ( screenSize.height - frameSize.height ) / 2 );

    // näyttää ohjelman
    frame.setVisible( true );
  }

  /**
   * Main-metodi.
   * @param args käynnistysparametrit
   */
  public static void main( String[] args )
  {
    try
    {
      UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
    }
    catch ( Exception e )
    {
      e.printStackTrace();
    }
    new ListComboApp();
  }
}
