public searchDialog(JDialog fatherDialog,String[] items){   //Իб

        super(fatherDialog,true);
        setTitle("");
        this.str=items;
        temp=items[0];              //ĬѡһѡûδĬѡһûд¼
        JPanel contentPanel=new JPanel();       //
        setContentPane(contentPanel);
        final JComboBox comboBox=new JComboBox(items);      //б
        comboBox.addItemListener(new ItemListener() {


            public void itemStateChanged(ItemEvent e) {             //
                temp = String.valueOf(comboBox.getSelectedItem());      //ûѡ

            }
        });
        contentPanel.add(new JLabel("ѡݣ"));
        contentPanel.add(comboBox);         //б

        contentPanel.add(new JLabel("ݣ"));      //ı
        final JTextField textField=new JTextField(10);
        contentPanel.add(textField);

        JButton okBtn=new JButton("ȷ");            //ȷťύ

        okBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {            //¼
                searchText=textField.getText();     //û
                dispose();                          //رնԻ
            }
        });

        contentPanel.add(okBtn);
        setSize(200, 150);              //öԻ
        setLocationRelativeTo(null);
        setVisible(true);

    }