@SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
    private void initComponents() {

    	accountPanel = new javax.swing.JPanel();
        accountLabel = new javax.swing.JLabel();
        account = new javax.swing.JLabel();
        TabPanel = new javax.swing.JPanel();
        mainTabbedPane1 = new javax.swing.JTabbedPane();
        historyPanel = new HisPanel(); //！！
        advantagePanel = new javax.swing.JPanel();
        recommendationPanel = new javax.swing.JPanel();
        comparisonPanel = new ComPanel();
        MenuBar = new javax.swing.JMenuBar();
        fileMenu = new javax.swing.JMenu();
        importSortMenuItem = new javax.swing.JMenuItem();
        exportSortMenuItem = new javax.swing.JMenuItem();
        accountMenu = new javax.swing.JMenu();
        switchAccountMenuItem = new javax.swing.JMenuItem();
        updateSortMenuItem = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setPreferredSize(new java.awt.Dimension(1000, 750));

        accountLabel.setText("账号：");

        account.setText("NULL");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(accountPanel);
        accountPanel.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(accountLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(account)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(accountLabel)
                    .addComponent(account))
                .addContainerGap(15, Short.MAX_VALUE))
        );

        mainTabbedPane1.addTab("我的奋斗史", historyPanel);

        javax.swing.GroupLayout advantagePanelLayout = new javax.swing.GroupLayout(advantagePanel);
        advantagePanel.setLayout(advantagePanelLayout);
        advantagePanelLayout.setHorizontalGroup(
            advantagePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 395, Short.MAX_VALUE)
        );
        advantagePanelLayout.setVerticalGroup(
            advantagePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 204, Short.MAX_VALUE)
        );

        mainTabbedPane1.addTab("我的亮点", advantagePanel);

        javax.swing.GroupLayout recommendationPanelLayout = new javax.swing.GroupLayout(recommendationPanel);
        recommendationPanel.setLayout(recommendationPanelLayout);
        recommendationPanelLayout.setHorizontalGroup(
            recommendationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 395, Short.MAX_VALUE)
        );
        recommendationPanelLayout.setVerticalGroup(
            recommendationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 204, Short.MAX_VALUE)
        );

        mainTabbedPane1.addTab("题目推荐", recommendationPanel);

        mainTabbedPane1.addTab("差距对比", comparisonPanel);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(TabPanel);
        TabPanel.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(mainTabbedPane1)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(mainTabbedPane1)
        );

        fileMenu.setText("文件");

        importSortMenuItem.setText("导入分类");
        importSortMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                //docMenuItem0ActionPerformed(evt);
            	JFileChooser fd = new JFileChooser();
            	//fd.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            	fd.showOpenDialog(null);
            	File sourceFile = fd.getSelectedFile();
            	String sort = "E:\\doc\\sort.txt";
            	File targetFile = new File(sort);
            	
            	if(sourceFile != null){
            		FileInputStream fi = null;
                    FileOutputStream fo = null;
                    FileChannel in = null;
                    FileChannel out = null;
                    try {
                        fi = new FileInputStream(sourceFile);
                        fo = new FileOutputStream(targetFile);
                        in = fi.getChannel();//得到对应的文件通道
                        out = fo.getChannel();//得到对应的文件通道
                        in.transferTo(0, in.size(), out);//连接两个通道，并且从in通道读取，然后写入out通道
                    } catch (IOException e) {
                        e.printStackTrace();
                    } finally {
                        try {
                            fi.close();
                            in.close();
                            fo.close();
                            out.close();
                        } catch (IOException e) {
                            e.printStackTrace();
                        }
                    }
            	}
            }
        });
        fileMenu.add(importSortMenuItem);

        exportSortMenuItem.setText("导出分类");
        exportSortMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                //docMenuItem0ActionPerformed(evt);
            	String str = new String();
            	try {
            		FileReader fr = new FileReader("E:\\doc\\sort.txt");
                    BufferedReader br=new BufferedReader(fr);
                    JFileChooser jf = new JFileChooser();
                    jf.setFileSelectionMode(JFileChooser.SAVE_DIALOG | JFileChooser.DIRECTORIES_ONLY);
                    jf.showDialog(null,null);
                    File fi = jf.getSelectedFile();
                    String f = fi.getAbsolutePath()+"\\sort.txt";
                    System.out.println("save: "+f);
                    //FileWriter out = new FileWriter(f);
                    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(f))));
                    while((str = br.readLine())!=null) {
                        out.write(str);
                        out.newLine();
                        out.flush();
                    }
                    br.close();
                    out.close();
            	}
            	catch(Exception e){}
            }
        });
        fileMenu.add(exportSortMenuItem);

        updateSortMenuItem.setText("编辑分类");
        updateSortMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                //docMenuItem0ActionPerformed(evt);
            	new UpdateSort();
            }
        });
        fileMenu.add(updateSortMenuItem);

        MenuBar.add(fileMenu);

        accountMenu.setText("账号");

        switchAccountMenuItem.setText("切换账号");
        accountMenu.add(switchAccountMenuItem);

        MenuBar.add(accountMenu);

        setJMenuBar(MenuBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(accountPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(TabPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(TabPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(accountPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>