package Test7_2_zxj;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Recommend extends Frame{
// 编写一个班级推选优秀生的软件,可列出参与推优的学生名单,能够显示当前投票人数以及每名候选者得票数,以图形化显示得票数
int []nPoll={
0,0,0,0,0};
public Recommend()
{
super("班级推优");
setBounds(300,300,600,600);
this.setLayout(new BorderLayout());
//北边
JPanel pNorth=new JPanel();
pNorth.setLayout(new FlowLayout());
JLabel vote=new JLabel("投票人数");
JTextField vote1=new JTextField(10);
JLabel max=new JLabel("最高票");
JTextField max1=new JTextField(10);
pNorth.add(vote);
pNorth.add(vote1);
pNorth.add(max);
pNorth.add(max1);
this.add(pNorth,BorderLayout.NORTH);
//南边
JPanel pSouth=new JPanel();
pSouth.setLayout(new FlowLayout());
JButton bVote=new JButton("投票");
pSouth.add(bVote);
JButton bCancel=new JButton("取消");
pSouth.
编写一个班级推选优秀生的软件,可列出参与推优的学生名单,能够显示当前投票人数以及每名候选者得票数,以图形化显示得票数。
最新推荐文章于 2022-10-19 22:17:27 发布