• 大小: 5.4MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-18
  • 语言: Java
  • 标签: 拼图  

资源简介

拼图游戏

资源截图

代码片段和文件信息


import java.io.IOException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Choice;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dialog;
import java.awt.Font;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.Jframe;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
class MyMainframe extends Jframe implements ActionListener 
{
        
        private static final long serialVersionUID = 1L;
     Dialog dialog;            //  0000000000000000
     Thread  ChangeLabel ;     //  0000000000000000
     JButton l;                //00000000000000
     boolean onetime = true;    //00000000000000000
        MyCanvas myCanvas;
        JPanel panelNorthpanelPreview; 
        Button startpreviewsetaboutlevel; 
        Container container; 
       int dengji=1;
        public MyMainframe() 
        { 
                container=this.getContentPane();
                start=new Button(“开始“);
                start.addActionListener(this);    
                preview=new Button(“预览“);
                preview.addActionListener(this);  
                set = new Button(“设置“);
                set.addActionListener(this);  
                
                level=new  Button(“等级“);
                level.addActionListener(this);   
                
                about=new Button(“帮助“);
                about.addActionListener(this);
                
                dialog=new MyDialog(this“提示:“true);   //有模式的对话框000000000000
                l = new JButton(“00:00“); // 倒计时显示000000000000000000000000
         l.setFont(new Font(“宋体“ Font.BOLD 12)); 
         l.setForeground(Color.RED); 
         start.addActionListener(new ActionListener() { 
                    public void actionPerformed(ActionEvent arg0)
                    { if(dengji==1)
                      new ChangeLabel(“1:00“).start(); 
                    if(dengji==2)
                        new ChangeLabel(“2:00“).start(); 
                    if(dengji==3)
                        new ChangeLabel(“3:00“).start(); 
                    } 
                                                               });   
                                          //000000000000000000000000000
                panelPreview=new JPanel();
                panelPreview.setLayout(null);
                Icon icon=new ImageIcon (“images/pic_“+MyCanvas.pictureID+“.jpg“);
                JLabel label=new JLabel(icon);     
                label.setBounds(00400400);      
                panelPreview.add(label);           
                 
                panelNorth=new JPanel();
                panelNorth.setBackground(Color.yellow);
   

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-04-20 17:43  pingtu\
     文件         299  2012-04-07 22:54  pingtu\.classpath
     文件         382  2012-04-07 22:54  pingtu\.project
     目录           0  2012-04-07 22:54  pingtu\.settings\
     文件         629  2012-04-07 22:54  pingtu\.settings\org.eclipse.jdt.core.prefs
     目录           0  2012-04-20 17:43  pingtu\bin\
     文件         614  2012-04-19 15:56  pingtu\bin\AA.class
     文件         849  2012-04-19 15:56  pingtu\bin\Cell.class
     文件         620  2012-04-19 15:56  pingtu\bin\login$1.class
     文件        2169  2012-04-19 15:56  pingtu\bin\login$Canvass.class
     文件        3624  2012-04-19 15:56  pingtu\bin\login.class
     文件        4317  2012-04-19 15:56  pingtu\bin\MyCanvas.class
     文件        2887  2012-04-19 15:56  pingtu\bin\MyDialog.class
     文件        1060  2012-04-09 12:17  pingtu\bin\MyFileFilter.class
     文件         868  2012-04-19 15:56  pingtu\bin\MyMainframe$1.class
     文件        2097  2012-04-19 15:56  pingtu\bin\MyMainframe$ChangeLabel.class
     文件        4908  2012-04-19 15:56  pingtu\bin\MyMainframe.class
     目录           0  2012-04-20 17:43  pingtu\bin\picture\
     目录           0  2012-04-20 17:49  pingtu\bin\ping\
     文件        5493  2012-04-09 12:17  pingtu\bin\pingtu$1.class
     文件         812  2012-04-09 12:17  pingtu\bin\pingtu$2.class
     文件         739  2012-04-09 12:17  pingtu\bin\pingtu$3.class
     文件         782  2012-04-09 12:17  pingtu\bin\pingtu$4.class
     文件        3480  2012-04-09 12:17  pingtu\bin\pingtu.class
     文件         850  2012-04-20 17:35  pingtu\bin\ping\frame$1.class
     文件         864  2012-04-20 17:35  pingtu\bin\ping\frame.class
     文件        4161  2012-04-20 17:46  pingtu\bin\ping\Menu.class
     文件         658  2012-04-19 20:28  pingtu\bin\ping\MenuBar$1.class
     文件        1424  2012-04-19 20:28  pingtu\bin\ping\MenuBar$2.class
     文件         863  2012-04-19 20:28  pingtu\bin\ping\MenuBar$3.class
     文件         787  2012-04-19 20:28  pingtu\bin\ping\MenuBar$4.class
............此处省略88个文件信息

评论

共有 条评论