日期:2014-05-20 浏览次数:20716 次
import java.awt.BorderLayout;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.border.Border;
import javax.swing.table.DefaultTableModel;
public class kucunchaxun extends JFrame {
private JPanel topPane;
private JPanel bottomPane;
private Border border;
private JComboBox combo;
private JTextField jtf1;
private JButton ok;
private JButton clean;
private Statement stmt;
private ResultSet rs;
private DefaultTableModel model;
private JTable table;
public kucunchaxun()
{
super("ZZZZ");
this.setLocationRelativeTo(null);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setSize(500,500);
this.setLayout(new BorderLayout());
combo=new JComboBox();
topPane=new JPanel();
bottomPane=new JPanel();
jtf1=new JTextField();
border=BorderFactory.createTitledBorder(border,"查询条件");
topPane.setBorder(border);
combo.addItem("dfdf");
topPane.setLayout(null);
topPane.add(combo);
combo.setBounds(20,20,50,30);
topPane.add(jtf1);
jtf1.setBounds(80,20,50,30);
add(topPane,BorderLayout.NORTH);
add(bottomPane,BorderLayout.CENTER);
this.setVisible(true);
}
public static void main(String args[])
{
new kucunchaxun();
}
}
package csdn.programbbs_622;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;