150分悬赏,帮我修改个JAVA小程序...

来源:百度知道 编辑:UC知道 时间:2024/05/17 09:27:10
这是一个数字拼图游戏,有运行后的图.我想要实现其他的一些功能,寻求各位大虾的帮助~!!!!

要求1:这个是一个applet的程序,改成正常的java.
2.成功的排列顺序是"空格,1,2....."怎么看?
3.成功后要弹出一个框说是否重新开始游戏,然后有一个选择.
4.鼠标指针指到某个按键上颜色会发生变化,怎么做?

总之拜托大家了~!!我们两天以后要交~~
能做哪些做哪些吧~!!!能正常运行就行.
做好发我邮箱camillelee2009@gmail.com

拜托大家了~!!!
做好我有加分~!!

import java.applet.Applet;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;

public class movesquare extends Applet implements ActionListener
{
Panel p;
JButton b[];
Label l;
int cnt;
boolean flag;
Image ig;
ImageIcon h;
public movesquare()
{
}
public void init()
{

p = new Panel();
l = new Label("ready");
cnt = 0;
flag = false;
b = new JButton[9];
GridLayout Grid = new

改为JAVA了,其他功能我没时间了。在项目呢
import javax.swing.*;
import java.awt.*;
public class JPanelDemo extends JFrame {
private JPanel DisplayPanel,InputPanel;
private Container container;
private JTextField tfResult;
private static final String Lables=" 87654321";
public JPanelDemo()
{
super("计算器");
this.setSize(200,230);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void setLayout()
{
container=getContentPane();
container.setLayout(new BorderLayout());
DisplayPanel=new JPanel();
DisplayPanel.setLayout(new BorderLayout());
tfResult=new JTextField();
DisplayPanel.add(tfResult,BorderLayout.CENTER);
container.add(DisplayPanel,BorderLayout.NORTH);
InputPanel=new JPanel();
InputPanel.setLayout(new GridLayout(3,3));
for(int i=0;i<Lables.length();i++)
{
JButton btn=new JButton(Lables.substring(i,i+1));
InputPa