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

📄 demojsplitpaneframe.java

📁 基于netbeans的java桌面应用程序合集
💻 JAVA
字号:
/*
 * DemoJSplitPaneFrame.java
 *
 * Created on 2007年7月30日, 下午9:42
 */

package org.Adam;
import java.lang.String;
import java.awt.Point;

/**
 *
 * @author  Administrator
 */
public class DemoJSplitPaneFrame extends javax.swing.JFrame {
    
    /** Creates new form DemoJSplitPaneFrame */
    public DemoJSplitPaneFrame() {
        initComponents();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" 生成的代码 ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jSplitPaneGlobal = new javax.swing.JSplitPane();
        jLabelLeft = new javax.swing.JLabel();
        jLabelRight = new javax.swing.JLabel();
        jButtonReset = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jSplitPaneGlobal.setDividerLocation(200);
        jSplitPaneGlobal.setDividerSize(3);
        jLabelLeft.setText("\u8fd9\u662f\u5de6\u90e8\u5206");
        jSplitPaneGlobal.setLeftComponent(jLabelLeft);

        jLabelRight.setText("\u8fd9\u662f\u53f3\u90e8\u5206");
        jSplitPaneGlobal.setRightComponent(jLabelRight);

        jButtonReset.setText("\u8fd8\u539f");
        jButtonReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonResetActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(48, 48, 48)
                        .add(jSplitPaneGlobal, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 284, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(layout.createSequentialGroup()
                        .add(140, 140, 140)
                        .add(jButtonReset)))
                .addContainerGap(68, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(70, 70, 70)
                .add(jSplitPaneGlobal, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 64, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 87, Short.MAX_VALUE)
                .add(jButtonReset)
                .add(77, 77, 77))
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonResetActionPerformed
// TODO 将在此处添加您的处理代码:
        this.jSplitPaneGlobal.setDividerLocation(130);
        //String a=new String();
        //a=this.getLocation();
        
       // System.out.println(a);
    }//GEN-LAST:event_jButtonResetActionPerformed
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new DemoJSplitPaneFrame().setVisible(true);
            }
        });
    }
    
    // 变量声明 - 不进行修改//GEN-BEGIN:variables
    private javax.swing.JButton jButtonReset;
    private javax.swing.JLabel jLabelLeft;
    private javax.swing.JLabel jLabelRight;
    private javax.swing.JSplitPane jSplitPaneGlobal;
    // 变量声明结束//GEN-END:variables
    
}

⌨️ 快捷键说明

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