JAVA抽奖系统源代码.docx

上传人:b****6 文档编号:15339239 上传时间:2023-07-03 格式:DOCX 页数:27 大小:20.26KB
下载 相关 举报
JAVA抽奖系统源代码.docx_第1页
第1页 / 共27页
JAVA抽奖系统源代码.docx_第2页
第2页 / 共27页
JAVA抽奖系统源代码.docx_第3页
第3页 / 共27页
JAVA抽奖系统源代码.docx_第4页
第4页 / 共27页
JAVA抽奖系统源代码.docx_第5页
第5页 / 共27页
JAVA抽奖系统源代码.docx_第6页
第6页 / 共27页
JAVA抽奖系统源代码.docx_第7页
第7页 / 共27页
JAVA抽奖系统源代码.docx_第8页
第8页 / 共27页
JAVA抽奖系统源代码.docx_第9页
第9页 / 共27页
JAVA抽奖系统源代码.docx_第10页
第10页 / 共27页
JAVA抽奖系统源代码.docx_第11页
第11页 / 共27页
JAVA抽奖系统源代码.docx_第12页
第12页 / 共27页
JAVA抽奖系统源代码.docx_第13页
第13页 / 共27页
JAVA抽奖系统源代码.docx_第14页
第14页 / 共27页
JAVA抽奖系统源代码.docx_第15页
第15页 / 共27页
JAVA抽奖系统源代码.docx_第16页
第16页 / 共27页
JAVA抽奖系统源代码.docx_第17页
第17页 / 共27页
JAVA抽奖系统源代码.docx_第18页
第18页 / 共27页
JAVA抽奖系统源代码.docx_第19页
第19页 / 共27页
JAVA抽奖系统源代码.docx_第20页
第20页 / 共27页
亲,该文档总共27页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

JAVA抽奖系统源代码.docx

《JAVA抽奖系统源代码.docx》由会员分享,可在线阅读,更多相关《JAVA抽奖系统源代码.docx(27页珍藏版)》请在冰点文库上搜索。

JAVA抽奖系统源代码.docx

JAVA抽奖系统源代码

/*主界面

*MainFrame.java

*

*Createdon__DATE__,__TIME__

*/

packagecom.insigma.frame;

importjava.io.BufferedReader;

importjava.io.FileInputStream;

importjava.io.IOException;

importjava.io.InputStreamReader;

import.URLDecoder;

importjavax.swing.JDialog;

importjavax.swing.JFrame;

importjavax.swing.UIManager;

importorg.jvnet.substance.SubstanceLookAndFeel;

importorg.jvnet.substance.painter.StandardGradientPainter;

importorg.jvnet.substance.theme.SubstanceTerracottaTheme;

importmutil.CardThread;

importmutil.CommUtil;

importmutil.ImageThread;

/**

*

*@author__USER__

*/

publicclassMainFrameextendsjavax.swing.JDialog

{

/**CreatesnewformMainFrame*/

publicMainFrame(java.awt.Frameparent,booleanmodal)

{

super(parent,modal);

initComponents();

this.setLocationRelativeTo(null);//居中显示

try

{

UIManager.setLookAndFeel(newSubstanceLookAndFeel());

JFrame.setDefaultLookAndFeelDecorated(true);

JDialog.setDefaultLookAndFeelDecorated(true);

SubstanceLookAndFeel

.setCurrentTheme(newSubstanceTerracottaTheme());

//SubstanceLookAndFeel.setSkin(newEmeraldDuskSkin());

//SubstanceLookAndFeel.setCurrentButtonShaper(new

//ClassicButtonShaper());

//SubstanceLookAndFeel.setCurrentWatermark(new

//SubstanceBubblesWatermark());

//SubstanceLookAndFeel.setCurrentBorderPainter(new

//StandardBorderPainter());

//SubstanceLookAndFeel.setCurrentGradientPainter(new

//StandardGradientPainter());//水晶蓝

//SubstanceLookAndFeel.setCurrentTitlePainter(new

//FlatTitlePainter());

}catch(Exceptione)

{

System.err.println("Somethingwentwrong!

");

}

try

{

showPerson();

}catch(IOExceptione)

{

//TODOAuto-generatedcatchblock

e.printStackTrace();

}

}

publicvoidshowPerson()throwsIOException

{

Stringfilename=URLDecoder.decode(Class.class.getResource(

"/com/insigma/config/name.txt").getPath());

FileInputStreamfileInputStream=newFileInputStream(filename);

InputStreamReaderinputStreamReader=newInputStreamReader(

fileInputStream,"gbk");

BufferedReaderbufferedReader=newBufferedReader(inputStreamReader);

Stringname="";

Stringbufname="";

intkey=1;

while((name=bufferedReader.readLine())!

=null)

{

if(bufname.equals(""))

bufname=name;

else

bufname=bufname+"\n"+name;

CommUtil.map.put(key,name);

key++;

}

this.jTextArea4.setText(bufname);

this.jLabel4.setText("准备......!

");

}

/**Thismethodiscalledfromwithintheconstructorto

*initializetheform.

*WARNING:

DoNOTmodifythiscode.Thecontentofthismethodis

*alwaysregeneratedbytheFormEditor.

*/

//GEN-BEGIN:

initComponents

//

privatevoidinitComponents()

{

jLabel1=newjavax.swing.JLabel();

jLabel2=newjavax.swing.JLabel();

jLabel3=newjavax.swing.JLabel();

jScrollPane1=newjavax.swing.JScrollPane();

jTextArea1=newjavax.swing.JTextArea();

jScrollPane2=newjavax.swing.JScrollPane();

jTextArea2=newjavax.swing.JTextArea();

jScrollPane3=newjavax.swing.JScrollPane();

jTextArea3=newjavax.swing.JTextArea();

jLabel4=newjavax.swing.JLabel();

jLabel5=newjavax.swing.JLabel();

jScrollPane4=newjavax.swing.JScrollPane();

jTextArea4=newjavax.swing.JTextArea();

jButton1=newjavax.swing.JButton();

jButton2=newjavax.swing.JButton();

jButton3=newjavax.swing.JButton();

jLabel6=newjavax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

setTitle("\u516c\u53f8\u5e74\u7ec8\u62bd\u5956\u7cfb\u7edf");

jLabel1.setText("\u4e00\u7b49\u5956\u83b7\u5f97\u8005\uff1a");

jLabel2.setText("\u4e8c\u7b49\u5956\u83b7\u5f97\u8005\uff1a");

jLabel3.setText("\u4e09\u7b49\u5956\u83b7\u5f97\u8005\uff1a");

jTextArea1.setColumns(20);

jTextArea1.setRows(5);

jScrollPane1.setViewportView(jTextArea1);

jTextArea2.setColumns(20);

jTextArea2.setRows(5);

jScrollPane2.setViewportView(jTextArea2);

jTextArea3.setColumns(20);

jTextArea3.setRows(5);

jScrollPane3.setViewportView(jTextArea3);

jLabel4.setFont(newjava.awt.Font("宋体",1,18));

jLabel4.setForeground(newjava.awt.Color(255,0,0));

jLabel4.setBorder(javax.swing.BorderFactory

.createLineBorder(newjava.awt.Color(0,0,0)));

jLabel5.setText("\u62bd\u5956\u8005\u540d\u5355\uff1a");

jTextArea4.setColumns(20);

jTextArea4.setRows(5);

jScrollPane4.setViewportView(jTextArea4);

jButton1.setText("\u5f00\u59cb");

jButton1.addActionListener(newjava.awt.event.ActionListener()

{

publicvoidactionPerformed(java.awt.event.ActionEventevt)

{

jButton1ActionPerformed(evt);

}

});

jButton2.setText("\u6682\u505c");

jButton2.setEnabled(false);

jButton2.addActionListener(newjava.awt.event.ActionListener()

{

publicvoidactionPerformed(java.awt.event.ActionEventevt)

{

jButton2ActionPerformed(evt);

}

});

jButton3.setText("\u91cd\u7f6e");

jButton3.setEnabled(false);

jButton3.addActionListener(newjava.awt.event.ActionListener()

{

publicvoidactionPerformed(java.awt.event.ActionEventevt)

{

jButton3ActionPerformed(evt);

}

});

jLabel6.setFont(newjava.awt.Font("微软雅黑",1,36));

jLabel6.setForeground(newjava.awt.Color(153,0,153));

jLabel6.setText("\u516c\u53f8\u5e74\u7ec8\u62bd\u5956");

javax.swing.GroupLayoutlayout=newjavax.swing.GroupLayout(

getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(layout

.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

layout.createSequentialGroup()

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

layout.createSequentialGroup()

.addGap(98,98,

98)

.addComponent(

jButton1)

.addGap(47,47,

47)

.addComponent(

jButton3)

.addGap(44,44,

44)

.addComponent(

jButton2)

.addGap(104,

104,

104))

.addGroup(

layout.createSequentialGroup()

.addContainerGap()

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

layout.createSequentialGroup()

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(

jScrollPane1,

javax.swing.GroupLayout.PREFERRED_SIZE,

142,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(

jLabel1))

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED,

14,

Short.MAX_VALUE)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(

jLabel2)

.addComponent(

jScrollPane2,

javax.swing.GroupLayout.PREFERRED_SIZE,

137,

javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(33,

33,

33)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(

jScrollPane3,

javax.swing.GroupLayout.PREFERRED_SIZE,

126,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(

jLabel3)))

.addGroup(

layout.createSequentialGroup()

.addGap(108,

108,

108)

.addComponent(

jLabel6))

.addComponent(

jLabel5)

.addGroup(

layout.createSequentialGroup()

.addComponent(

jScrollPane4,

javax.swing.GroupLayout.PREFERRED_SIZE,

134,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED,

80,

Short.MAX_VALUE)

.addComponent(

jLabel4,

javax.swing.GroupLayout.PREFERRED_SIZE,

116,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(122,

122,

122)))

.addPreferredGap(

javax.swing.LayoutStyle.Compone

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 人文社科 > 法律资料

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2