📄 horsetravel.java
字号:
/* * horseTravel.java * * Created on June 16, 2008, 5:54 PM */package horsetravel;import javax.swing.*;import java.io.EOFException;/** * * @author Administrator */public class horseTravel extends javax.swing.JFrame { public static int bb,cc; /** Creates new form horseTravel */ public horseTravel() { initComponents(); this.setVisible(true); this.setSize(800, 750); this.setLocation(300, 0); } // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jTextField2 = new javax.swing.JTextField(); jButton65 = new javax.swing.JButton(); jButton66 = new javax.swing.JButton(); jButton67 = new javax.swing.JButton(); jButton68 = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jButton5 = new javax.swing.JButton(); jButton6 = new javax.swing.JButton(); jButton7 = new javax.swing.JButton(); jButton8 = new javax.swing.JButton(); jButton9 = new javax.swing.JButton(); jButton10 = new javax.swing.JButton(); jButton11 = new javax.swing.JButton(); jButton12 = new javax.swing.JButton(); jButton13 = new javax.swing.JButton(); jButton14 = new javax.swing.JButton(); jButton15 = new javax.swing.JButton(); jButton16 = new javax.swing.JButton(); jButton17 = new javax.swing.JButton(); jButton18 = new javax.swing.JButton(); jButton19 = new javax.swing.JButton(); jButton20 = new javax.swing.JButton(); jButton21 = new javax.swing.JButton(); jButton22 = new javax.swing.JButton(); jButton23 = new javax.swing.JButton(); jButton24 = new javax.swing.JButton(); jButton25 = new javax.swing.JButton(); jButton26 = new javax.swing.JButton(); jButton27 = new javax.swing.JButton(); jButton28 = new javax.swing.JButton(); jButton29 = new javax.swing.JButton(); jButton30 = new javax.swing.JButton(); jButton31 = new javax.swing.JButton(); jButton32 = new javax.swing.JButton(); jButton33 = new javax.swing.JButton(); jButton34 = new javax.swing.JButton(); jButton35 = new javax.swing.JButton(); jButton36 = new javax.swing.JButton(); jButton37 = new javax.swing.JButton(); jButton38 = new javax.swing.JButton(); jButton39 = new javax.swing.JButton(); jButton40 = new javax.swing.JButton(); jButton41 = new javax.swing.JButton(); jButton42 = new javax.swing.JButton(); jButton43 = new javax.swing.JButton(); jButton44 = new javax.swing.JButton(); jButton45 = new javax.swing.JButton(); jButton46 = new javax.swing.JButton(); jButton47 = new javax.swing.JButton(); jButton48 = new javax.swing.JButton(); jButton49 = new javax.swing.JButton(); jButton50 = new javax.swing.JButton(); jButton51 = new javax.swing.JButton(); jButton52 = new javax.swing.JButton(); jButton53 = new javax.swing.JButton(); jButton54 = new javax.swing.JButton(); jButton55 = new javax.swing.JButton(); jButton56 = new javax.swing.JButton(); jButton57 = new javax.swing.JButton(); jButton58 = new javax.swing.JButton(); jButton59 = new javax.swing.JButton(); jButton60 = new javax.swing.JButton(); jButton61 = new javax.swing.JButton(); jButton62 = new javax.swing.JButton(); jButton63 = new javax.swing.JButton(); jButton64 = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jLabel4 = new javax.swing.JLabel(); jTextField3 = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("马周游"); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("操作区域")); jLabel1.setText("输入行号(1-8):"); jLabel2.setText("输入列号(1-8):"); jTextField1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { jTextField1KeyTyped(evt); } }); jTextField2.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { jTextField2KeyTyped(evt); } }); jButton65.setText("开始"); jButton65.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton65ActionPerformed(evt); } }); jButton66.setText("退出"); jButton66.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton66ActionPerformed(evt); } }); jButton67.setText("查看源代码"); jButton67.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton67ActionPerformed(evt); } }); jButton68.setText("查看实验报告"); jButton68.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton68ActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap() .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup() .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(jTextField2) .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE))) .add(jPanel1Layout.createSequentialGroup() .add(jButton65, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 83, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(jButton66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 78, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addContainerGap(20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createSequentialGroup() .add(70, 70, 70) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, jButton67, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, jButton68, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .add(21, 21, 21) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(18, 18, 18) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(18, 18, 18) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton65, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jButton66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 34, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(27, 27, 27) .add(jButton67) .add(25, 25, 25) .add(jButton68) .addContainerGap(23, Short.MAX_VALUE)) ); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("棋盘(动态演示区域)")); jButton2.setText("2"); jButton3.setText("3"); jButton4.setText("4"); jButton5.setText("5"); jButton6.setText("6"); jButton7.setText("7"); jButton8.setText("8"); jButton9.setText("9"); jButton10.setText("10"); jButton11.setText("11"); jButton12.setText("12"); jButton13.setText("13"); jButton14.setText("14"); jButton15.setText("15"); jButton16.setText("16"); jButton17.setText("17"); jButton18.setText("18"); jButton19.setText("19"); jButton20.setText("20"); jButton21.setText("21"); jButton22.setText("22"); jButton23.setText("23"); jButton24.setText("24"); jButton25.setText("25"); jButton26.setText("26"); jButton27.setText("27"); jButton28.setText("28"); jButton29.setText("29"); jButton30.setText("30"); jButton31.setText("31"); jButton32.setText("32"); jButton33.setText("33"); jButton34.setText("34"); jButton35.setText("35");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -