java netbeans 学习程序合集

源代码在线查看: add.java

软件大小: 1404 K
上传用户: yuyx2003
关键词: netbeans java 程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*
				 * Add.java
				 *
				 * Created on 2007年9月21日, 下午11:13
				 */
				
				package org.Adam;
				
				import java.awt.BorderLayout;
				import java.util.Vector;
				import javax.swing.JTabbedPane;
				import javax.swing.table.DefaultTableModel;
				
				/**
				 *
				 * @author  Administrator
				 */
				public class Add extends javax.swing.JFrame {
				    SelectManage selectmanage=new SelectManage();
				    Select select=new Select();
				    JTabbedPane jta=new JTabbedPane();
				    /** Creates new form Add */
				    public Add() {
				        initComponents();
				        this.setLocationRelativeTo(this);
				        this.jta.add("as",selectmanage);
				        this.jta.add("vb",select);
				        select.shout();
				        this.jPanel1.add(this.jta,BorderLayout.CENTER);
				    }
				    
				    /** 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.
				     */
				    // //GEN-BEGIN:initComponents
				    private void initComponents() {
				        jPanel1 = new javax.swing.JPanel();
				        jButton1 = new javax.swing.JButton();
				
				        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
				        jPanel1.setLayout(new java.awt.BorderLayout());
				
				        jButton1.setText("jButton1");
				        jButton1.addActionListener(new java.awt.event.ActionListener() {
				            public void actionPerformed(java.awt.event.ActionEvent evt) {
				                jButton1ActionPerformed(evt);
				            }
				        });
				
				        jPanel1.add(jButton1, java.awt.BorderLayout.NORTH);
				
				        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(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 714, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
				                .addContainerGap(20, Short.MAX_VALUE))
				        );
				        layout.setVerticalGroup(
				            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
				            .add(layout.createSequentialGroup()
				                .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 545, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
				                .addContainerGap(20, Short.MAX_VALUE))
				        );
				        pack();
				    }// //GEN-END:initComponents
				
				    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
				// TODO 将在此处添加您的处理代码:
				        if(selectmanage==null){
				            selectmanage=new SelectManage();
					    selectmanage.shout();//同步获得表数据
				        }   
				     
				        this.jPanel1.add(selectmanage,BorderLayout.CENTER);
				        this.repaint();
				       // this.statusBar.setText("信息查询--档案");
				        this.jButton1.setText("asd");
				    }//GEN-LAST:event_jButton1ActionPerformed
				    
				    /**
				     * @param args the command line arguments
				     */
				    public static void main(String args[]) {
				        java.awt.EventQueue.invokeLater(new Runnable() {
				            public void run() {
				                new Add().setVisible(true);
				            }
				        });
				    }
				    
				    // 变量声明 - 不进行修改//GEN-BEGIN:variables
				    private javax.swing.JButton jButton1;
				    private javax.swing.JPanel jPanel1;
				    // 变量声明结束//GEN-END:variables
				    
				}
							

相关资源