四人斗地主java程序

四人斗地主java程序

ID:47699019

大小:221.00 KB

页数:38页

时间:2020-01-21

四人斗地主java程序_第1页
四人斗地主java程序_第2页
四人斗地主java程序_第3页
四人斗地主java程序_第4页
四人斗地主java程序_第5页
资源描述:

《四人斗地主java程序》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、packagepoker;/***

Title:斗地主

*

Description:

*

Copyright:Copyright(c)2004

*

Company:

*@author李艳生*@version1.0*/importjava.awt.*;importjavax.swing.*;importjava.awt.event.*;importjava.util.*;publicclassCallPokerDialogextendsJDialog{JButtonbtnOne=

2、newJButton();JButtonbtnTwo=newJButton();JButtonbtnThree=newJButton();JButtonbtnFour=newJButton();intscore=PokerKernal.score;publicCallPokerDialog(){try{jbInit();}catch(Exceptione){e.printStackTrace();}}privatevoidjbInit()throwsException{this.setSize(newDimensio

3、n(330,80));//居中显示DimensionscreenSize=Toolkit.getDefaultToolkit().getScreenSize();this.setLocation((screenSize.width-330)/2,(screenSize.height-80)/2);this.setModal(true);this.setResizable(false);this.setTitle("请叫牌");if(score==1){btnOne.setBackground(Color.pink);

4、}elseif(score==2){btnOne.setBackground(Color.pink);btnTwo.setBackground(Color.pink);}btnOne.setBounds(newRectangle(11,16,67,25));btnOne.setText("1分");btnOne.addActionListener(newCallPokerDialog_btnOne_actionAdapter(this));this.getContentPane().setLayout(null);b

5、tnTwo.setBounds(newRectangle(82,17,73,25));btnTwo.setText("2分");btnTwo.addActionListener(newCallPokerDialog_btnTwo_actionAdapter(this));btnThree.setBounds(newRectangle(161,17,73,25));btnThree.setText("3分");btnThree.addActionListener(newCallPokerDialog_btnThree_

6、actionAdapter(this));btnFour.setBounds(newRectangle(240,16,73,25));btnFour.setSelected(false);btnFour.setText("不要");btnFour.addActionListener(newCallPokerDialog_btnFour_actionAdapter(this));this.getContentPane().add(btnOne,null);this.getContentPane().add(btnTwo

7、,null);this.getContentPane().add(btnThree,null);this.getContentPane().add(btnFour,null);}voidbtnOne_actionPerformed(ActionEvente){if(score<1){PokerKernal.score=1;PokerKernal.two.call=1;this.dispose();}}voidbtnTwo_actionPerformed(ActionEvente){if(score<2){PokerK

8、ernal.two.call=2;PokerKernal.score=2;this.dispose();}}voidbtnThree_actionPerformed(ActionEvente){if(score<3){PokerKernal.two.call=3;PokerKernal.score=3;this.dispose();}}void

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。