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

📄 introducedialog.java

📁 八皇后游戏
💻 JAVA
字号:
/*
 * IntroduceDialog.java
 *
 * Created on 2008年3月31日, 下午9:25
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package javaapplication15;


import java.awt.*;
import javax.swing.*;

/**
 *
 * @author vivi
 */
public class IntroduceDialog extends JDialog {          //介绍对话框
    
    /** Creates a new instance of IntroduceDialog */
    public IntroduceDialog(JFrame f,String s) {
        super(f,s);
//        JPanel p=new JPanel();
       Container con=this.getContentPane();
       Container contentPanel1=new JPanel(new GridLayout(2,1));
       Container contentPanel2=new  JPanel(new GridLayout(1,1));
       this.setLayout(new BorderLayout());
       JLabel crown=new JLabel();
       JLabel test=new JLabel("尝试放置皇后在 N*N 棋盘中,无法威胁到另一个.即所有棋子不能在");
       JLabel test2=new JLabel("同一行,同一列,和同一斜列,使用鼠标左键放置皇后,使用鼠标右键悔棋");
       crown.setIcon(new ImageIcon("oldman.jpg"));
       contentPanel2.add(crown);
       con.add(contentPanel2,BorderLayout.CENTER);

       contentPanel1.add(test);
         contentPanel1.add(test2);
      con.add(contentPanel1,BorderLayout.SOUTH);
       setBounds(100,100,500,200);
    }
    
}

⌨️ 快捷键说明

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