import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class Frame extends JFrame implements ActionListener{
JButton jb1,jb2,jb3,jb4,jb5,jb6;
JLabel jl1,jl2,jl3,jl4,jl5,jl6,jl7,jl8,jl9;
JTextField jt1,jt2;
public Frame(){
super("窗口");
this.getContentPane().setLayout(new FlowLayout());
jl1 = new JLabel("请选择提示语言的种类");
jb1 =new JButton("普通话");
jb2 =new JButton("英语");
jb1.addActionListener(this);
jb2.addActionListener(this);
this.getContentPane().add(jl1);
this.getContentPane().add(jb1);
this.getContentPane().add(jb2);
this.setSize(200,100);
this.setVisible(true);
}
public void actionPerformed(ActionEvent e){
if(e.getSource()== jb1){
JFrame f1 =new JFrame("");
f1.getContentPane().setLayout(new FlowLayout());
jl2 = new JLabel("请选择服务项目");
jb3 =new JButton("冲值卡冲值");
jb4 =new JButton("查询余额");
jb3.addActionListener(this);
jb4.addActionListener(this);
f1.getContentPane().add(jl2);
f1.getContentPane().add(jb3);
f1.getContentPane().add(jb4);
f1.setSize(200,100);
import java.awt.*;
import java.awt.event.*;
class Frame extends JFrame implements ActionListener{
JButton jb1,jb2,jb3,jb4,jb5,jb6;
JLabel jl1,jl2,jl3,jl4,jl5,jl6,jl7,jl8,jl9;
JTextField jt1,jt2;
public Frame(){
super("窗口");
this.getContentPane().setLayout(new FlowLayout());
jl1 = new JLabel("请选择提示语言的种类");
jb1 =new JButton("普通话");
jb2 =new JButton("英语");
jb1.addActionListener(this);
jb2.addActionListener(this);
this.getContentPane().add(jl1);
this.getContentPane().add(jb1);
this.getContentPane().add(jb2);
this.setSize(200,100);
this.setVisible(true);
}
public void actionPerformed(ActionEvent e){
if(e.getSource()== jb1){
JFrame f1 =new JFrame("");
f1.getContentPane().setLayout(new FlowLayout());
jl2 = new JLabel("请选择服务项目");
jb3 =new JButton("冲值卡冲值");
jb4 =new JButton("查询余额");
jb3.addActionListener(this);
jb4.addActionListener(this);
f1.getContentPane().add(jl2);
f1.getContentPane().add(jb3);
f1.getContentPane().add(jb4);
f1.setSize(200,100);