package nh;
import javax.swing.*;
import java.awt.GridLayout;
import java.awt.event.*;
public class nh {
public static void main(String[] args) {
JFrame f=new JFrame("学生信息");
f.setLayout(null);
f.setSize(400,300);
f.setVisible(true);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel l1=new JLabel("姓名");//标签
l1.setBounds(5,20,30,20);//位置大小
f.add(l1);
JLabel l2=new JLabel("性别");
l2.setBounds(5,50,30,20);
f.add(l2);
JLabel l3=new JLabel("年龄");
l3.setBounds(5,80,30,20);
f.add(l3);
JTextField t1=new JTextField();
t1.setBounds(50, 20, 100, 25);
f.add(t1);
//f.setVisible(true);
JTextField t2=new JTextField();
t2.setBounds(50, 80, 100, 25);
f.add(t2);
//f.setVisible(true);
JRadioButton r1=