package test;
import javax.swing.JComboBox;
import javax.swing.JFrame;
public class YuGiOh extends JFrame
{
private static final long serialVersionUID = 1L;
public YuGiOh ()
{
setTitle ("test");
setSize (100, 60);
setLocationRelativeTo (null);
setResizable (false);
setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
}
YuGiOh addComponents ()
{
JComboBox comboBox = new JComboBox (new String[]{"1","2","3"});
add (comboBox);
comboBox.setSelectedIndex (2);
return this;
}
public static void main ( String[] args )
{
new YuGiOh ().addComponents ().setVisible (true);
}
}