• 大小: 232KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-14
  • 语言: Java
  • 标签: 抽签  源码  netbeans  

资源简介

design by Empty 一个最简单的随机数抽签程序!已打包成双击可运行的exe程序! 基于java swing编写,功能相当简单!! 就是点击roll产生一个0~100的随机数先到jTextField,再点击再显示一个!!基本满足简单的随机抽签!! 项目采用netbeans6.9开发~~源码也一并附上!!请多指教~~ 之后还会有稍微复杂点的推出~~~^_^

资源截图

代码片段和文件信息

/*
 * To change this template choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Rollframe.java
 *
 * Created on 2011-1-27 16:37:03
 */

package roll;

import java.util.Random;

/**
 *
 * @author Administrator
 */
public class Rollframe extends javax.swing.Jframe {

    /** Creates new form Rollframe */
    public Rollframe() {
        initComponents();
        //jTextField1.setEditable(false);   //不可修改
        jTextField1.setEnabled(false);      //不可用
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings(“unchecked“)
    // //GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jTextField1 = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setFont(new java.awt.Font(“微软雅黑“ 1 24)); // NOI18N
        jLabel1.setText(“随机数抽签程序“);

        jButton1.setText(“Roll“);
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jTextField1.setFont(new java.awt.Font(“微软雅黑“ 1 12)); // NOI18N
        jTextField1.setForeground(new java.awt.Color(255 51 51));
        jTextField1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField1ActionPerformed(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font(“微软雅黑“ 0 9)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(153 153 153));
        jLabel2.setText(“Edit by Empty“);

        jLabel3.setFont(new java.awt.Font(“微软雅黑“ 0 9)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(153 153 153));
        jLabel3.setText(“2011年1月27日“);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING layout.createSequentialGroup()
                .addContainerGap(259 Short.MAX_VALUE)
                .addComponent(jLabel3)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING layout.createSequentialGroup()
                .addContainerGap(261 Short.MAX_VALUE)
                .addComponent(jLabel2)
                .addContainerGap())
            .addGroup(layout.createSequ

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件         66  2011-01-27 17:27  Roll\build\built-jar.properties

     文件        721  2011-01-27 17:27  Roll\build\classes\roll\Rollframe$1.class

     文件        721  2011-01-27 17:27  Roll\build\classes\roll\Rollframe$2.class

     文件        524  2011-01-27 17:27  Roll\build\classes\roll\Rollframe$3.class

     文件       4682  2011-01-27 17:27  Roll\build\classes\roll\Rollframe.class

     文件       3707  2011-01-27 16:36  Roll\build.xml

     文件       1443  2011-01-27 17:27  Roll\dist\README.TXT

     文件       7658  2011-01-27 17:27  Roll\dist\Roll.jar

     文件         85  2011-01-27 16:36  Roll\manifest.mf

     文件      49033  2011-01-27 16:36  Roll\nbproject\build-impl.xml

     文件        475  2011-01-27 16:36  Roll\nbproject\genfiles.properties

     文件          0  2011-01-27 16:39  Roll\nbproject\private\config.properties

     文件        173  2011-01-27 16:39  Roll\nbproject\private\private.properties

     文件        211  2011-01-28 01:28  Roll\nbproject\private\private.xml

     文件       2360  2011-01-27 16:39  Roll\nbproject\project.properties

     文件        512  2011-01-27 16:36  Roll\nbproject\project.xml

     文件      67702  2011-01-27 17:47  Roll\png-2098.ico

     文件       1813  2011-01-27 17:48  Roll\Roll.exe4j

     文件       6471  2011-01-27 17:19  Roll\src\roll\Rollframe.form

     文件       5722  2011-01-27 17:19  Roll\src\roll\Rollframe.java

     目录          0  2011-01-27 17:27  Roll\build\classes\roll

     目录          0  2011-01-27 17:27  Roll\build\classes

     目录          0  2011-01-27 17:27  Roll\build\empty

     目录          0  2011-01-27 17:48  Roll\nbproject\private

     目录          0  2011-01-27 16:58  Roll\src\roll

     目录          0  2011-01-27 17:27  Roll\build

     目录          0  2011-01-27 17:27  Roll\dist

     目录          0  2011-01-27 16:36  Roll\nbproject

     目录          0  2011-01-27 16:36  Roll\src

     目录          0  2011-01-27 16:36  Roll\test

............此处省略5个文件信息

评论

共有 条评论