【Java开源代码栏目提醒】:网学会员在Java开源代码频道为大家收集整理了CommAndUntie.java提供大家参考,希望对大家有所帮助!
package com.cdd.tool;
import java.io.*;
import java.awt.*;
import javax.swing.*;
import java.awt.Dimension;
import java.util.*;
import javax.swing.JComboBox;
import com.fileBath.util.*;
public class CommAndUntie extends JFrame {
static File cunDir=new File("C:\\");
static File[] fl;
static File[] chuanFile;
static File fenGeFile;
static File cunMuLu;
private JFrame jFrame = null;
private JTabbedPane jTabbedPane = null;
private JPanel jPanel = null;
private JPanel jPanel1 = null;
private JLabel jLabel = null;
private JTextField jTextField = null;
private JButton jButton = null;
private JLabel jLabel1 = null;
private JTextField jTextField1 = null;
private JButton jButton1 = null;
private JLabel sizeMessagejLabel = null;
private JTextField commSize = null;
private JLabel fileSizejLabel = null;
private JButton commjButton = null;
private JButton jButton3 = null;
private JButton openFilejButton = null;
private JButton jButton5 = null;
private JFileChooser jFileChooser = null;
private JFileChooser jFileChooser1 = null;
private JScrollPane jScrollPane = null;
private JTextArea jTextArea = null;
private JButton exitjButton = null;
private JLabel jLabel41 = null;
private JComboBox jComboBox = null;
private JTextField pathTextField = null;
private JButton jButton7 = null;
/**
* This method initializes jFrame
*
* @return javax.swing.JFrame
*/
private JFrame getJFrame() {
if (jFrame == null) {
jFrame = new JFrame("分割/合并模块");
jFrame.setSize(new Dimension(361, 274));
jFrame.setContentPane(getJTabbedPane());
jFrame.setVisible(true);
jFrame.setLocation(300,280);
jFrame.setDefaultCloseOperation(jFrame.HIDE_ON_CLOSE);
}
return jFrame;
}
/**
* This method initializes jTabbedPane
*
* @return javax.swing.JTabbedPane
*/
private JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
jTabbedPane.addTab("分割", getJPanel());
jTabbedPane.addTab("合并", getJPanel1());
}
return jTabbedPane;
}
/**
* This method initializes jPanel
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel() {
if (jPanel == null) {
fileSizejLabel = new JLabel();
fileSizejLabel.setBounds(new Rectangle(283, 106, 51, 18));
fileSizejLabel.setText("MB");
sizeMessagejLabel = new JLabel();
sizeMessagejLabel.setBounds(new Rectangle(11, 103, 87, 28));
sizeMessagejLabel.setText("分割大小");
jLabel1 = new JLabel();
jLabel1.setBounds(new Rectangle(11, 60, 83, 28));
jLabel1.setText("存储目录");
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
jLabel = new JLabel();
jLabel.setText("源文件");
jLabel.setBounds(new Rectangle(11, 16, 76, 33));
jPanel = new JPanel();
jPanel.setLayout(null);
jPanel.add(jLabel, gridBagConstraints);
jPanel.add(getJTextField(), null);
jPanel.add(getJButton(), null);
jPanel.add(jLabel1, null);
jPanel.add(getJTextField1(), null);
jPanel.add(getJButton1(), null);
jPanel.add(sizeMessagejLabel, null);
jPanel.add(getJTextField2(), null);
jPanel.add(fileSizejLabel, null);
jPanel.add(getJButton2(), null);
jPanel.add(getJButton3(), null);
}
return jPanel;
}
/**
* This method initializes jPanel1
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel1() {
if (jPanel1 == null) {
jPanel1 = new JPanel();
jPanel1.setLayout(null);
jPanel1.add(getopenFilejButton(), null);
jPanel1.add(getJButton5(), null);
jP