A. Source
package introduce;
import java.awt.Container;
import java.awt.FlowLayout;
import javax.swing.*;
class introduce extends JFrame
{
public introduce()
{
JFrame a=new JFrame();
a.setLayout(new FlowLayout());
a.setTitle("Introduction");
a.setSize(400,200);
a.setLocation(300,240);
JLabel c=new JLabel("姓名:");
a.add(c);
JLabel d=new JLabel("马小霞");
a.add(d);
JRadioButton radio1, radio2;
a.add(new JLabel("性别:"));
ButtonGroup group = new ButtonGroup(); //单选按钮所在的组
radio1 = new JRadioButton ( "male"); // create radio buttons
radio2 = new JRadioButton ( "F");
group.add (Radio1);
group.add (Radio2);
a.add (Radio1);
a.add (Radio2);
a.add (new new the JLabel ( "national:")); // create a drop-down box
String proList [] = { "Han", "Hui", "Tibet", "Man", "others"};
the comboBox the JComboBox;
Container conPane the getContentPane = ();
the comboBox the JComboBox new new = (PROLIST);
comboBox.setEditable (to true);
conPane.add (the comboBox);
a.add (conPane);
a JCheckBox checkBox1, checkBox2, checkBox3, checkBox4; // create a selection box
a.add (new JLabel ( "Hobbies:"));
checkBox1 = new JCheckBox ( "movies");
checkBox2 = new new JCheckBox ( "music");
checkBox3 = new new JCheckBox ( "playing games");
checkBox4 = new new JCheckBox ( "Tour");
a.add (checkBox1);
a.add (checkBox2);
a.add (checkBox3);
a.add (checkBox4);
a.add (new new the JLabel ( "professional:")); // create a text area with a scroll bar
String str [] = { "network", "software engineering", "things", "computer science and technology"};
the JList the JList new new List = (STR);
list.setVisibleRowCount (. 3); // set the number of lines visible
a.add (new JScrollPane (list)); // add a text area with the rolling conditions
a.setVisible (true);
}
}
public class Introduction {
public static void main(String[] args)
{
new introduce();
}
}
import java.awt.Container;
import java.awt.FlowLayout;
import javax.swing.*;
class introduce extends JFrame
{
public introduce()
{
JFrame a=new JFrame();
a.setLayout(new FlowLayout());
a.setTitle("Introduction");
a.setSize(400,200);
a.setLocation(300,240);
JLabel c=new JLabel("姓名:");
a.add(c);
JLabel d=new JLabel("马小霞");
a.add(d);
JRadioButton radio1, radio2;
a.add(new JLabel("性别:"));
ButtonGroup group = new ButtonGroup(); //单选按钮所在的组
radio1 = new JRadioButton ( "male"); // create radio buttons
radio2 = new JRadioButton ( "F");
group.add (Radio1);
group.add (Radio2);
a.add (Radio1);
a.add (Radio2);
a.add (new new the JLabel ( "national:")); // create a drop-down box
String proList [] = { "Han", "Hui", "Tibet", "Man", "others"};
the comboBox the JComboBox;
Container conPane the getContentPane = ();
the comboBox the JComboBox new new = (PROLIST);
comboBox.setEditable (to true);
conPane.add (the comboBox);
a.add (conPane);
a JCheckBox checkBox1, checkBox2, checkBox3, checkBox4; // create a selection box
a.add (new JLabel ( "Hobbies:"));
checkBox1 = new JCheckBox ( "movies");
checkBox2 = new new JCheckBox ( "music");
checkBox3 = new new JCheckBox ( "playing games");
checkBox4 = new new JCheckBox ( "Tour");
a.add (checkBox1);
a.add (checkBox2);
a.add (checkBox3);
a.add (checkBox4);
a.add (new new the JLabel ( "professional:")); // create a text area with a scroll bar
String str [] = { "network", "software engineering", "things", "computer science and technology"};
the JList the JList new new List = (STR);
list.setVisibleRowCount (. 3); // set the number of lines visible
a.add (new JScrollPane (list)); // add a text area with the rolling conditions
a.setVisible (true);
}
}
public class Introduction {
public static void main(String[] args)
{
new introduce();
}
}
II. Experimental results
III. Experience and experience
Experiments are done with the help of students, there is a certain degree of difficulty to achieve them want to do better.