bt1.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt)
{
int i=0;
try{
Class.forName("com.mysql.jdbc.Driver");
// String source="jdbc:odbc:lan";
。。。
String sql="
SELECT * FROM name WHERE name='"+tf1.getText()+"' and pwd='"+tf2.getText()+"'";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next())