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

📄 condialog.java

📁 这是一个可自动生成迷宫、自动或人工寻找迷宫路径的java程序
💻 JAVA
字号:
package maze;import java.awt.*;import javax.swing.*;import com.borland.jbcl.layout.*;import java.awt.event.*;import javax.swing.border.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: </p> * @author unascribed * @version 1.0 */public class ConDialog extends JDialog {  private JPanel panel1 = new JPanel();  private JLabel Text = new JLabel();  private JButton jButton1 = new JButton();  private CardLayout cardLayout1 = new CardLayout();  private TitledBorder titledBorder1;  public ConDialog(Frame frame, String title, boolean modal) {    super(frame, title, modal);    try {      jbInit();      pack();    }    catch(Exception ex) {      ex.printStackTrace();    }  }  public ConDialog() {    this(null, "", false);  }  private void jbInit() throws Exception {    titledBorder1 = new TitledBorder("");    this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);    this.setModal(true);    this.setResizable(false);    this.setTitle("恭喜");    this.getContentPane().setLayout(cardLayout1);    Text.setBackground(Color.white);    Text.setFont(new java.awt.Font("Serif", 1, 18));    Text.setToolTipText("");    Text.setHorizontalAlignment(SwingConstants.CENTER);    Text.setHorizontalTextPosition(SwingConstants.CENTER);    Text.setText("迷宫已破!恭喜!恭喜!");    jButton1.setToolTipText("");    jButton1.setActionCommand("OK");    jButton1.setHorizontalTextPosition(SwingConstants.CENTER);    jButton1.setText("确定");    jButton1.addMouseListener(new java.awt.event.MouseAdapter() {      public void mouseClicked(MouseEvent e) {        jButton1_mouseClicked(e);      }    });    panel1.setBorder(titledBorder1);    panel1.add(Text, null);    panel1.add(jButton1, null);    this.getContentPane().add(panel1, "panel1");  }  void jButton1_mouseClicked(MouseEvent e) {    this.dispose();  }}

⌨️ 快捷键说明

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