仿 tombola 抽奖工具 JTombola

码农软件 · 软件分类 · Windows桌面开发组件 · 2019-10-07 13:57:40

软件介绍

JTombola

一个简单而吸引人的桌面应用程序,模仿tombola制作的抽奖项目。

使用

该方案主要包括以下两个安装包:

ocb.jtombola.core
  +- NamesLoader.java
  +- TombolaLabel.java
ocb.jtombola.gui
  +- MainForm.java
  +- TombolaPanel.java

主机体

MainFrame 从 JFrame 类继承,当用户关闭框架时,可实现 WindowListener 接口检测:

public class MainFrame extends JFrame implements WindowListener

TombolaPanel:

TombolaPanel pnltombola;

设置以下属性来构造框架:

public MainFrame() {
  this.pnltombola = new TombolaPanel();
  this.add(pnltombola);
  this.setTitle("Tómbola 2016");
  this.setResizable(false);
  this.setSize(1024, 750);
  this.setLocationRelativeTo(null);
  this.addWindowListener(this);
}

当用户关闭框架时:

@Override
public void windowClosing(WindowEvent we) {
  pnltombola.saveWinners();
  System.exit(0);
}

我们能确保获奖者名单在应用程序退出之前保存。

本文地址:https://codercto.com/soft/d/16236.html

Algorithms Unlocked

Algorithms Unlocked

Thomas H. Cormen / The MIT Press / 2013-3-1 / USD 25.00

Have you ever wondered how your GPS can find the fastest way to your destination, selecting one route from seemingly countless possibilities in mere seconds? How your credit card account number is pro......一起来看看 《Algorithms Unlocked》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具