import java.awt.*;
import javax.swing.*;
import javax.swing.JComboBox;
class grid extends JFrame
{
String[] Sex = {"Male", "Female"};
String[] Day = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"};
String[] Month = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
String[] Year = {"Freshmen", "Sophomore", "Junior", "Senior"};
String[] Sched = {"Morning", "Afternoon", "Evening"};
public grid()
{
setLocation(400,300);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JPanel mc = new JPanel(new GridLayout(20,20));
mc.add(new JLabel("OTAKU HIGH",JLabel.CENTER));
mc.add(new JLabel("Name:",JLabel.LEFT));
mc.add(new JTextField(20));
mc.add(new JLabel("Age:",JLabel.LEFT));
mc.add(new JTextField(20));
mc.add(new JLabel("Sex:",JLabel.LEFT));
mc.add(new JComboBox<String>(Sex));
mc.add(new JLabel("Birthday:",JLabel.LEFT));
mc.add(new JComboBox<String>(Month));
mc.add(new JLabel("Day:",JLabel.LEFT));
mc.add(new JComboBox<String>(Day));
mc.add(new JLabel("BirthYear:",JLabel.LEFT));
mc.add(new JTextField(10));
mc.add(new JLabel("Address:",JLabel.LEFT));
mc.add(new JTextField(20));
mc.add(new JLabel("Schedule:",JLabel.LEFT));
mc.add(new JComboBox<String>(Sched));
mc.add(new JLabel("Year:",JLabel.LEFT));
mc.add(new JComboBox<String>(Year));
mc.add(new JButton("Done",JLabel.LEFT));
getContentPane().add(mc);
pack();
}
public static void main(String[] args){new grid().setVisible(true);}
}
Ann aiko 0 Newbie Poster
mKorbel 274 Veteran Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.