标签:new ble 使用方法 win exit intro button end 计算
实验程序:
package shiyan;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.TitledBorder;
public class ShiYan12 extends JFrame {
final ButtonGroup bp=new ButtonGroup();
public static void main(String[] args) {
ShiYan12 frame=new ShiYan12();
frame.setVisible(true);
}
public ShiYan12(){
super();
setBounds(300,300,300,300);
setTitle("个人简历");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JMenuBar menubar=new JMenuBar();
setJMenuBar(menubar);
JMenu introduce=new JMenu("个人信息");
menubar.add(introduce);
JMenu xingming=new JMenu("姓名");
introduce.add(xingming);
JMenuItem xingming1=new JMenuItem("白云超");
xingming.add(xingming1);
JMenu xingbie=new JMenu("性别");
introduce.add(xingbie);
JMenuItem xingbie1=new JMenuItem("男");
xingbie.add(xingbie1);
JMenu nianling=new JMenu("年龄");
introduce.add(nianling);
JMenuItem nianling1=new JMenuItem("20");
nianling.add(nianling1);
JMenu minzu=new JMenu("民族");
introduce.add(minzu);
JMenuItem minzu1=new JMenuItem("回");
minzu.add(minzu1);
JMenu xueyuan=new JMenu("学院");
introduce.add(xueyuan);
JMenuItem xueyuan1=new JMenuItem("计算机学院");
xueyuan.add(xueyuan1);
JMenu zhuanye=new JMenu("专业");
introduce.add(zhuanye);
JMenuItem zhuanye1=new JMenuItem("网络工程");
zhuanye.add(zhuanye1);
JMenu xuehao=new JMenu("学号");
introduce.add(xuehao);
JMenuItem xuehao1=new JMenuItem("20173311108");
xuehao.add(xuehao1);
JMenu place=new JMenu("籍贯");
introduce.add(place);
JMenuItem place1=new JMenuItem("青海大通");
place.add(place1);
}
}
实验结果:
标签:new ble 使用方法 win exit intro button end 计算
原文地址:https://www.cnblogs.com/baiyunchao/p/11073649.html