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

📄 mainjframe.java

📁 九宫问题(八数码)的一个小软件
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
        j7.setText("7");
        j7.setEnabled(false);

        j2.setText("2");
        j2.setEnabled(false);

        j5.setText("5");
        j5.setEnabled(false);

        j3.setText("3");
        j3.setEnabled(false);

        j8.setText("8");
        j8.setEnabled(false);

        j6.setText("0");
        j6.setEnabled(false);

        j9.setText("6");
        j9.setEnabled(false);

        userId.setText("userid");

        jLabel5.setText(java.util.ResourceBundle.getBundle("org/ray/ninegrid/frame").getString("userid"));

        org.jdesktop.layout.GroupLayout newDialogLayout = new org.jdesktop.layout.GroupLayout(newDialog.getContentPane());
        newDialog.getContentPane().setLayout(newDialogLayout);
        newDialogLayout.setHorizontalGroup(
            newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(newDialogLayout.createSequentialGroup()
                .addContainerGap()
                .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jb2)
                    .add(newDialogLayout.createSequentialGroup()
                        .add(17, 17, 17)
                        .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jb3)
                            .add(cb)
                            .add(js1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(newDialogLayout.createSequentialGroup()
                                .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                    .add(okBut)
                                    .add(jb4))
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(newDialogLayout.createSequentialGroup()
                                        .add(10, 10, 10)
                                        .add(jButton2))
                                    .add(newDialogLayout.createSequentialGroup()
                                        .add(j4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(j5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(j6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                    .add(newDialogLayout.createSequentialGroup()
                                        .add(j1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(j2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(j3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                    .add(newDialogLayout.createSequentialGroup()
                                        .add(j7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(j8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                        .add(j9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))))
                    .add(jb1)
                    .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, newDialogLayout.createSequentialGroup()
                            .add(jLabel5)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(userId))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, newDialogLayout.createSequentialGroup()
                            .add(17, 17, 17)
                            .add(ciplabel)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                .add(levelLabel)
                                .add(j0, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 163, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        newDialogLayout.setVerticalGroup(
            newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(newDialogLayout.createSequentialGroup()
                .addContainerGap()
                .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel5)
                    .add(userId, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jb1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(ciplabel)
                    .add(j0, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jb2)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(cb)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jb3)
                    .add(levelLabel))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(js1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jb4)
                    .add(j1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(j2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(j3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(j4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(j5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(j6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(j7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(j8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(j9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(newDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(okBut)
                    .add(jButton2))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        connectDialog.setTitle(java.util.ResourceBundle.getBundle("org/ray/ninegrid/frame").getString("connecting_title"));
        connectDialog.setLocationByPlatform(true);
        jLabel11.setText(java.util.ResourceBundle.getBundle("org/ray/ninegrid/frame").getString("connecting"));

        jProgressBar1.setIndeterminate(true);

        jLabel7.setText(java.util.ResourceBundle.getBundle("org/ray/ninegrid/frame").getString("connection"));

        connectStart.setText(java.util.ResourceBundle.getBundle("org/ray/ninegrid/frame").getString("start"));
        connectStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                connectStartActionPerformed(evt);
            }
        });

        numOfPlayer.setText("1");

        org.jdesktop.layout.GroupLayout connectDialogLayout = new org.jdesktop.layout.GroupLayout(connectDialog.getContentPane());
        connectDialog.getContentPane().setLayout(connectDialogLayout);
        connectDialogLayout.setHorizontalGroup(
            connectDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(connectDialogLayout.createSequentialGroup()
                .addContainerGap()
                .add(connectDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jProgressBar1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel11, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, connectDialogLayout.createSequentialGroup()
                        .add(numOfPlayer)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabel7)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 86, Short.MAX_VALUE)
                        .add(connectStart)))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        connectDialogLayout.setVerticalGroup(
            connectDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(connectDialogLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel11)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jProgressBar1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(connectDialogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(numOfPlayer)
                    .add(jLabel7)
                    .add(connectStart))
                .addContainerGap(11, Short.MAX_VALUE))
        );
        aboutDialog.setTitle(java.util.ResourceBundle.getBundle("org/ray/ninegrid/frame").getString("about"));
        aboutDialog.setLocationByPlatform(true);
        aboutDialog.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                aboutDialogMouseMoved(evt);
            }
        });

        jLabel8.setFont(new java.awt.Font("GungsuhChe", 1, 24));
        jLabel8.setForeground(new java.awt.Color(0, 0, 102));
        jLabel8.setText("NineGrid  -  version demo");

        jLabel9.setFont(new java.awt.Font("Courier New", 0, 14));
        jLabel9.setForeground(new java.awt.Color(0, 102, 153));
        jLabel9.setText("Author :");

        jLabel10.setFont(new java.awt.Font("Courier New", 0, 14));
        jLabel10.setForeground(new java.awt.Color(0, 102, 153));
        jLabel10.setLabelFor(aboutDialog);
        jLabel10.setText("School : ");

        jLabel12.setFont(new java.awt.Font("Courier New", 0, 14));
        jLabel12.setForeground(new java.awt.Color(0, 102, 153));
        jLabel12.setLabelFor(aboutDialog);
        jLabel12.setText("E-mail : ");

        jLabel13.setFont(new java.awt.Font("Courier New", 0, 14));
        jLabel13.setForeground(new java.awt.Color(0, 102, 153));
        jLabel13.setText("<html>Copyright &copy; 2006 by Weijie Ling</html>");

        jLabel14.setFont(new java.awt.Font("Courier New", 0, 14));
        jLabel14.setForeground(new java.awt.Color(0, 102, 153));
        jLabel14.setLabelFor(aboutDialog);
        jLabel14.setText("MyBlog : ");

        jTextArea1.setColumns(20);
        jTextArea1.setEditable(false);
        jTextArea1.setLineWrap(true);
        jTextArea1.setRows(5);
        jTextArea1.setText("\t     NineGrid release\n    Nine Grid is a simple gui program for ninegrid (eight puzzle). It's a free software, so you may use it anyway including edit of the source. \n    I write this program in order to finish my communication course homework and acm/icpc program course report. The program realize the communication with a so simply protocol that it is not safety in many cases. Some useful algorithms I learned from eight puzzle has been writen in the program, and you could see some statistic about the effeciense of different algorithms including BFS, double threshold BFS, A* searching.\n    Enjoy the game and algorithms!");
        jScrollPane2.setViewportView(jTextArea1);

        jLabel15.setFont(new java.awt.Font("Courier New", 0, 14));
        jLabel15.setLabelFor(aboutDialog);
        jLabel15.setText("<html><a href=\"http://blog.csdn.net/ray58750034/\">http://blog.csdn.net/ray58750034/</a></html>");
        jLabel15.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                handCursor(evt);
            }
        });
        jLabel15.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel15MouseClicked(evt);
            }
        });

        jLabel16.setFont(new java.awt.Font("Courier New", 0, 14));
        jLabel16.setForeground(new java.awt.Color(0, 102, 153));
        jLabel16.setText(" Weijie Ling ( Ray# )");

        jLabel17.setFont(new java.awt.Font("Courier New", 0, 14));
        jLabel17.setForeground(new java.awt.Color(0, 102, 153));
        jLabel17.setText("<html><a href=\"mailto:ray58750034@google.com\">ray58750034@google.com </a></html>");

⌨️ 快捷键说明

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