• 大小: 4.59MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-11
  • 语言: 其他
  • 标签: java  

资源简介

捕鱼达人详细代码 多线程的应用 可直接打开运行

资源截图

代码片段和文件信息

package zhengxianjun;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.Jframe;
import javax.swing.JLabel;

public class BeiJing extends JLabel implements ActionListener{
JButton close ;
JButton min;
Jframe huaBan;
public BeiJing(Jframe hb){
this.huaBan=hb;
this.setSize(829 544);
this.setIcon(new ImageIcon(“img/bg.png“));
this.setLocation(0 0);
close = new JButton();
close.addActionListener(this);
close.setIcon(new ImageIcon(“img/close.png“));
close.setBounds(780 15 24 24);
close.setBorderPainted(false);
close.setContentAreaFilled(false);
close.addMouseListener(new MouseAdapter() {

@Override
public void mouseEntered(MouseEvent e) {
// TODO Auto-generated method stub
super.mouseEntered(e);
close.setIcon(new ImageIcon(“img/close1.png“));
}

@Override
public void mouseExited(MouseEvent e) {
// TODO Auto-generated method stub
super.mouseExited(e);
close.setIcon(new ImageIcon(“img/close.png“));
}

});
this.add(close);
min = new JButton();
min.setIcon(new ImageIcon(“img/min.png“));
min.setBounds(745 15 24 24);
min.setContentAreaFilled(false);
min.setBorderPainted(false);
this.add(min);
min.addActionListener(this);
min.addMouseListener(new MouseAdapter() {

@Override
public void mouseEntered(MouseEvent e) {
// TODO Auto-generated method stub
super.mouseEntered(e);
min.setIcon(new ImageIcon(“img/min1.png“));
}

@Override
public void mouseExited(MouseEvent e) {
// TODO Auto-generated method stub
super.mouseExited(e);
min.setIcon(new ImageIcon(“img/min.png“));
}

});
}
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==close){
System.exit(0);
}
if(e.getSource()==min){
this.huaBan.setState(Jframe.ICONIFIED);
}

}
}

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

     文件        301  2018-07-27 09:05  捕鱼达人\.classpath

     文件        386  2018-07-27 09:05  捕鱼达人\.project

     文件        598  2018-07-27 09:05  捕鱼达人\.settings\org.eclipse.jdt.core.prefs

     文件       1017  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\BeiJing$1.class

     文件       1011  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\BeiJing$2.class

     文件       1850  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\BeiJing.class

     文件       4140  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\Bullet.class

     文件        812  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\BulletThread.class

     文件        383  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\Charge.class

     文件       1810  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\Fish.class

     文件       1387  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\FishNet.class

     文件        771  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\FishNetThread.class

     文件        808  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\FishThread.class

     文件       1317  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\HuaBan.class

     文件        978  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\HuaBu$1.class

     文件       1153  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\HuaBu$2.class

     文件       4061  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\HuaBu$3.class

     文件       7216  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\HuaBu.class

     文件        825  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\LocationUtil$1.class

     文件       1130  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\LocationUtil$2.class

     文件        778  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\LocationUtil.class

     文件        931  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\Money.class

     文件        727  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\MoneyThread.class

     文件        788  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\Reward.class

     文件       2625  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\RewardFishThread.class

     文件        734  2018-07-31 14:55  捕鱼达人\bin\zhengxianjun\RewardThread.class

     文件       1289  2018-07-23 19:40  捕鱼达人\img\A4.png

     文件     136296  2018-07-23 19:40  捕鱼达人\img\bg.png

     文件      38197  2018-07-23 19:40  捕鱼达人\img\bg1.jpg

     文件     188716  2018-07-23 19:40  捕鱼达人\img\bg_03.png

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

评论

共有 条评论