⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scorereportp.java

📁 java 版的俄罗斯方块在原来的基础上的网络版
💻 JAVA
字号:
package dialog;import java.awt.event.*;import java.awt.*;import javax.swing.*;import Score;/** * Title: * Description: * Copyright:    Copyright (c) 2001 * Company: * @author * @version 1.0 */public class ScoreReportP extends JPanel {    JButton button1 = new JButton();    JPanel panel1 = new JPanel();    JDialog m_dialog;    public ScoreReportP(JDialog d) {        m_dialog=d;        try {            jbInit();            myInit();        }        catch(Exception e) {            e.printStackTrace();        }    }    private void myInit() throws Exception{        JTextField[] m_textScore=new JTextField[10];        JTextField[] m_textName=new JTextField[10];        Score score=new Score();        int[] nScore=score.getScore();        String[] sName=score.getName();        for(int i=0;i<sName.length;i++)        {            JPanel p=new JPanel();            System.out.println(sName[i].trim());            m_textName[i]=new JTextField(sName[i],10);            m_textScore[i]=new JTextField(""+nScore[i],8);            m_textName[i].setEditable(false);            m_textScore[i].setEditable(false);            JLabel l1=new JLabel("玩家");            JLabel l2=new JLabel("分数");            p.add(l1);            p.add(m_textName[i]);            p.add(l2);            p.add(m_textScore[i]);            panel1.add(p);        }    }    private void jbInit() throws Exception {        button1.setText("确定");        button1.setBounds(new Rectangle(285, 234, 75, 29));        button1.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(ActionEvent e) {                button1_actionPerformed(e);            }        });        this.setLayout(null);        panel1.setBounds(new Rectangle(24, 16, 596, 207));        this.add(panel1, null);        this.add(button1, null);    }    void button1_actionPerformed(ActionEvent e) {        m_dialog.dispose();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -