/**
*
* @author Owner
*/
public class Checeout extends javax.swing.JFrame {
private Object jTable1;
/** Creates new form Checeout */
public Checeout() {
initComponents();
set();
}
//jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(vector1.toArray()));
//jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "赵","钱","孙","李","周","吴","郑","王","陈","韩")};
/** 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="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jPanel3 = new javax.swing.JPanel();
jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel2 = new javax.swing.JPanel();
jLabel9 = new javax.swing.JLabel();
jComboBox2 = new javax.swing.JComboBox();
jLabel10 = new javax.swing.JLabel();
jTextField8 = new javax.swing.JTextField();
jPanel4 = new javax.swing.JPanel();
public String getTextField(String wantName){
String ID=(String)jComboBox2.getSelectedItem();
TableInfo tableInfo=new TableInfo();
String sql1="SELECT * FROM doctor where DoctorName="+ID;
Vector vector11=new Vector();
tableInfo.getInformation(sql1,wantName , vector11);
return vector11.toString();
}
public Vector getTextFieldVector(String wantName){
String ID=(String)jComboBox1.getSelectedItem();
TableInfo tableInfo=new TableInfo();
String sql1="SELECT * FROM doctor where DoctorName="+ID;
Vector vector11=new Vector();
tableInfo.getInformation(sql1,wantName , vector11);
return vector11;
}
public void set(){
Toolkit toolKit=Toolkit.getDefaultToolkit();
Dimension dimension=toolKit.getScreenSize();
int WIDTH=getWidth();
int HEIGHT=getHeight();
int x=(dimension.width-WIDTH)/2;
int y=(dimension.height-HEIGHT)/2;
setLocation(x, y);
setResizable(false);
setTitle("查询:");
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Checeout().setVisible(true);