2024年4月15日发(作者:)

《Java编程》实验报告

班级

姓名

学号

成绩

任课教师

实验时间 课程名称 《Java编程》

实验题目 实验11

实验内容

package lrs;

import .*;

import .*;

import .*;

public class Experiment11_1 extends JFrame implements ActionListener{

public static void main(String[] args) {

// TODO Auto-generated method stub

new Experiment11_1();

JPanel jp=null;

JButton jb1=null;

JButton jb2=null;

JButton jb3=null;

JButton jb4=null;

JButton jb5=null;

JButton jb6=null;

}

public Experiment11_1()

{

}

@Override

jp=new JPanel();

jb1=new JButton("Button 1");

jb2=new JButton("Button 2");

jb3=new JButton("Button 3");

jb4=new JButton("Button 4");

jb5=new JButton("Button 5");

jb6=new JButton("Button 6");

ionListener(this);

ionListener(this);

ionListener(this);

ionListener(this);

ionListener(this);

ionListener(this);

ionCommand("1");

ionCommand("2");

ionCommand("3");

ionCommand("4");

ionCommand("5");

ionCommand("6");

out(new FlowLayout());

(jb1);

(jb2);

(jb3);

(jb4);

(jb5);

(jb6);

(jp);

out(new FlowLayout());

le("六个按钮");

e(550, 80);

ationRelativeTo(null);

ible(true);

aultCloseOperation(EXIT_ON_CLOSE);