/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package newMove;
import java.applet.Applet;
import java.applet.AudioClip;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import javax.swing.*;
import jxl.*;
import jxl.read.biff.BiffException;
import jxl.write.*;
import jxl.write.biff.RowsExceededException;
/**
*
* @author Administrator
*/
public class MyFlower extends MouseAdapter implements KeyListener,ActionListener{
private JPanel pa,panel1,panel2,panel4,panel5,panel6,panel7,panel666,panel8;
private JPanel[] panel3;
private JButton panel1Button1,panel1Close;
private JButton panel2Button1,panel2Button2,panel2Button3,panel2Button4,panel2Close;
private JButton panel3Return,panel4Return,panel5Return,panel6Return,panel7Return;
private JFrame frame;
private CardLayout card;
private int level;
private ScrollPane panel66;
private java.awt.Font f;
private static final long serialVersionUID=1L;
private Point origin;
private ImgPanel panel22;
private JLabel[] scoreLabel;
private JLabel[] nameLabel;
private JLabel[] levelLabel;
private JButton ONMUSIC,OFFMUSIC;
private Wall[][] wall;
private boolean drop;
private int which,score,flag;
AudioClip backmusic;
Dialog basicSet;
private JButton basicButton;
private JTextField basicField;
private JLabel basicLabel,personName,personLevel;
private Timer timer1;
static String[] name;
private String myName;
static int[] allscore;
static int[] levels;
static int[] types;
private JProgressBar progressbar;
private int doorPlace,playerPlace,chooseWall;
private int xPos,yPos,xVPos,yVPos,tempx,tempy,xVPos1,yVPos1;
public int direction;
private int moveDirection;
public boolean isStanding = true;
private boolean canMoveUp1,canMoveDown1,canMoveLeft1,canMoveRight1;
private boolean canMoveUp2,canMoveDown2,canMoveLeft2,canMoveRight2;
Thread animatorThread;
int delay = 10;
public static void main(String[] args){
MyFlower aLi = new MyFlower();
aLi.go();
}
public void go(){
frame = new JFrame();
f = new java.awt.Font("SansSerif",java.awt.Font.BOLD+java.awt.Font.ITALIC,28);
panel1= new JPanel() {
@Override
public void paintComponent(Graphics g) {
ImageIcon icon =
new ImageIcon("F:\\pp\\newback.jpg");
g.drawImage(icon.getImage(), 0, 0, frame.getSize().width,frame.getSize().height,frame);
}
};
panel1.setOpaque(false);
panel1.setLayout(null);
panel1.setBounds(0,0,1000,700);
panel1Button1 = new JButton("进入");
panel1Button1.setFont(f);
panel1Button1.setBackground(Color.YELLOW);
panel1Close = new JButton(new ImageIcon("F:\\pp\\endd.png"));
panel1Close.setRolloverIcon(new ImageIcon("F:\\pp\\end.png"));
panel1Close.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
panel1Close.setBounds(900,0,70,70);
panel1Close.setContentAreaFilled(false);
panel1Close.setBorder(null);
panel1Button1.setBounds(450, 500, 100, 50);
panel1Button1.addMouseListener(this);
panel1.add(panel1Button1);
panel1.add(panel1Close);
//菜单界面
panel2= new JPanel() {
@Override
public void paintComponent(Graphics g) {
ImageIcon icon =
new ImageIcon("F:\\pp\\back.jpg");
g.drawImage(icon.getImage(), 0, 0, frame.getSize().width,frame.getSize().height,frame);
}
};
panel2.setOpaque(false);
panel2.setLayout(null);
panel2.setBounds(0, 0, 1000, 700);
panel2Button1 = new JButton( "新游戏");
panel2Button1.setFont(f);
panel2Button1.setBackground(Color.PINK);
panel2Button2 = new JButton("新玩家");
panel2Button2.setFont(f);
panel2Button2.setBackground(Color.PINK);
panel2Button3 = new JButton("游戏介绍");
panel2Button3.setFont(f);
panel2Button3.setBackground(Color.PINK);
panel2Button4= new JButton("游戏记录");
panel2Button4.setFont(f);
panel2Button4.setBackground(Color.PINK);
panel2Close = new JButton(new ImageIcon("F:\\pp\\endd.png"));
panel2Close.setRolloverIcon(new ImageIcon("F:\\pp\\end.png"));
panel2Close.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
ImgPane ip=new ImgPane(Toolkit.getDefaultToolkit().createImage("F:\\pp\\Bubbles.png"));
ip.setBounds(850, 450, 128, 128);
ip.setOpaque(false);
panel8.add(ip);
card.show(pa,"card9");
ip.outStart();
}
});
panel2Close.setBounds(900,20,70,70);
panel2Close.setContentAreaFilled(false);
panel2Close.setBorder(null);
panel2Button1.setBounds(300, 250, 200, 50);
panel2Button2.setBounds(600, 250, 200, 50);
panel2Button3.setBounds(300, 400, 200, 50);
panel2Button4.setBounds(600, 400 , 200, 50);
panel2Button1.addMouseListener(this);
panel2Button2.addMouseListener(this);
panel2Button3.addMouseListener(this);
panel2Button4.addMouseListener(this);
panel2.add(panel2Button1);
panel2.add(panel2Button2);
panel2.add(panel2Button3);
panel2.add(panel2Button4);
panel2.add(panel2Close);
panel22 = new ImgPanel(Toolkit.getDefaultToolkit().createImage("F:\\pp\\Bubbles.png"));
panel22.setBounds(850, 550, 128, 128);
panel22.setOpaque(false);
//游戏界面
panel3 = new JPanel[2];
panel3[0]= new JPanel() {
@Override
public void paintComponent(Graphics g) {
ImageIcon icon =
new ImageIcon("F:\\pp\\bisai.jpg");
g.drawImage(icon.getImage(), 0, 0, frame.getSize().width,frame.getSize().height,frame);
}
};
panel3[0].setOpaque(false);
panel3[0].setLayout(null);
panel3[0].setBounds(0, 0, 1000, 700);
panel3[1]= new JPanel() {
@Override
public void paintComponent(Graphics g) {
ImageIcon icon =
new ImageIcon("F:\\pp\\bisai.jpg");
g.drawImage(icon.getImage(), 0, 0, frame.getSize().width,frame.getSize().height,frame);
}
};
panel3[1].setOpaque(false);
panel3[1].setLayout(null);
panel3[1].setBounds(0, 0, 1000, 700);
panel3Return = new JButton(new ImageIcon("F:\\pp\\LEFT.png"));
panel3Return.setRolloverIcon(new ImageIcon("F:\\pp\\LEFTT.png"));
panel3Return.addMouseListener(this);
panel3Return.setContentAreaFilled(false);
panel3Return.setBorder(null);
panel3Return.setBounds(900,0,75,75);
initMusic();
ONMUSIC = new JButton(new ImageIcon("F:\\pp\\ON.png"));
ONMUSIC.setRolloverIcon(new ImageIcon("F:\\pp\\ON1.png"));
ONMUSIC.addMouseListener(this);
OFFMUSIC = new JButton(new ImageIcon("F:\\pp\\OFF.png"));
OFFMUSIC.setRolloverIcon(new ImageIcon("F:\\pp\\OFF1.png"));
OFFMUSIC.addMouseListener(this);
OFFMUSIC.addMouseListener(this);
ONMUSIC.setContentAreaFilled(false);
ONMUSIC.setBorder(null);
ONMUSIC.setBounds(950,300,50,50);
OFFMUSIC.setContentAreaFilled(false);
OFFMUSIC.setBorder(null);
OFFMUSIC.setBounds(950,
没有合适的资源?快使用搜索试试~ 我知道了~
java小游戏,滚木块.zip
共90个文件
class:33个
png:29个
jpg:8个
需积分: 1 1 下载量 192 浏览量
2023-10-13
22:49:38
上传
评论
收藏 5.22MB ZIP 举报
温馨提示
java小游戏,滚木块.zipjava小游戏,滚木块.zipjava小游戏,滚木块.zip java小游戏,滚木块.zipjava小游戏,滚木块.zipjava小游戏,滚木块.zip java小游戏,滚木块.zipjava小游戏,滚木块.zipjava小游戏,滚木块.zip java小游戏,滚木块.zipjava小游戏,滚木块.zipjava小游戏,滚木块.zip java小游戏,滚木块.zipjava小游戏,滚木块.zipjava小游戏,滚木块.zip java小游戏,滚木块.zipjava小游戏,滚木块.zipjava小游戏,滚木块.zip java小游戏,滚木块.zipjava小游戏,滚木块.zipjava小游戏,滚木块.zip java小游戏,滚木块.zipjava小游戏,滚木块.zipjava小游戏,滚木块.zip java小游戏,滚木块.zipjava小游戏,滚木块.zipjava小游戏,滚木块.zip java小游戏,滚木块.zipjava小游戏,滚木块.zipjava小游戏,滚木块.zip
资源推荐
资源详情
资源评论
收起资源包目录
java小游戏,滚木块.zip (90个子文件)
project_code_0628
nbproject
project.properties 3KB
genfiles.properties 467B
build-impl.xml 76KB
project.xml 500B
private
private.xml 336B
private.properties 184B
config.properties 0B
.gitattributes 378B
src
newMove
MyFlower.java 65KB
Wall.java 721B
ImgPanel.java 501B
dist
lib
jxl.jar 709KB
newMove.jar 28KB
build
classes
newMove
ImgPanel.class 696B
MyFlower$10.class 2KB
MyFlower$4.class 2KB
MyFlower$13.class 2KB
MyFlower$7.class 1KB
MyFlower$2.class 954B
MyFlower$12.class 1KB
Wall.class 997B
MyFlower$5.class 1KB
MyFlower$9.class 1KB
MyFlower$1.class 1KB
MyFlower.class 31KB
MyFlower$3.class 1KB
MyFlower$11.class 1KB
MyFlower$ImgPane.class 2KB
MyFlower$8.class 1KB
MyFlower$6.class 1KB
MyFlower$14.class 1KB
MovingBox$1.class 724B
MovingBox$9.class 1KB
MovingBox$5.class 1KB
MovingBox$11.class 1KB
MovingBox$13.class 1KB
MovingBox$2.class 1KB
MovingBox$12.class 1KB
MovingBox$4.class 1KB
MovingBox$6.class 1KB
.netbeans_update_resources 0B
MovingBox$7.class 1KB
MovingBox$10.class 1KB
MovingBox$14.class 1KB
.netbeans_automatic_build 0B
MovingBox$3.class 1KB
MovingBox$15.class 1KB
MovingBox$8.class 1KB
built-jar.properties 78B
.gitignore 649B
pp
Wall.jpg 2KB
intro.jpg 190KB
backmusic1.au 3.73MB
up1.png 8KB
end.png 9KB
9.png 9KB
moving.xls 16KB
3.png 9KB
ON1.png 5KB
0.png 10KB
bisai.jpg 105KB
right1.png 7KB
back.jpg 125KB
down1.png 8KB
endd.png 6KB
LEFT.png 10KB
down2.png 8KB
door.png 4KB
1.png 6KB
standing.png 4KB
6.png 8KB
Bubbles.png 10KB
5.png 9KB
4.png 8KB
8.png 10KB
right2.png 8KB
up2.png 7KB
OFF1.png 4KB
newback.jpg 169KB
LEFTT.png 15KB
back111.jpg 142KB
left1.png 8KB
7.png 9KB
left2.png 8KB
33.jpg 99KB
ON.png 4KB
OFF.png 4KB
2.png 8KB
sleep.jpg 135KB
build.xml 3KB
共 90 条
- 1
资源评论
辣椒种子
- 粉丝: 3475
- 资源: 5724
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功