⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coverpanel.java

📁 java编写的一个推箱子游戏
💻 JAVA
字号:
/*
 * CoverPanel.java
 *
 * Created on 2008年4月20日, 上午10:36
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */
package tuixiangzi;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
/**
 *
 * @author Cheny
 */
public class CoverPanel extends JPanel implements MouseListener {
          private JButton  btnrenew = new JButton (" START   NEW   GAME ");
          private JButton  btncontinue = new JButton ("  CONTINUE  ");
          private JButton  btncredit= new JButton (" CREDIS  ");
          private JButton  btnexit= new JButton (" EXIT ");
          private ImageIcon imageIcon = new ImageIcon("pic\\"+7+".gif");
          
public CoverPanel() {
     
            setPreferredSize(new Dimension(410,380));
            setLayout(null);
            add(btnrenew);  add( btncontinue);   add( btnexit);  add(  btncredit);  
            btnrenew.addMouseListener(this);
            btncontinue.addMouseListener(this);
            btnexit.addMouseListener(this);
            btncredit.addMouseListener(this);
            btnrenew.setBounds(245,210,170,30);
            btncontinue.setBounds(270,245,130,30);
            btncredit.setBounds(290,280,100,30);
            btnexit.setBounds(305,315,76,30);
            setVisible(true);
      }
  public void paintComponent(Graphics page) {
        super.paintComponent( page );
        imageIcon.paintIcon(this, page, 0, 0);
   }
  
   public void mousePressed(MouseEvent e) {
       
          if(e.getSource()==btnrenew){
                   PassFrame.cardshow_panel();
            }
           if(e.getSource()== btncontinue){
                  PassFrame.cardshow_continue();
           }
          if(e.getSource()==btnexit){
                   PassFrame.FrameExit();
            }
          if(e.getSource()== btncredit){
                PassFrame.cardshow_Producer();
           }
      }

    public void mouseClicked(MouseEvent e) {
    }

    public void mouseReleased(MouseEvent e) {
    }

    public void mouseEntered(MouseEvent e) {
    }

    public void mouseExited(MouseEvent e) {
    }

    
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -