Java JDBC - 如何在顯示JOptionPane.showMessageDialog之后,在Java中重新啟用ToolTips...
我們想知道如何在顯示JOptionPane.showMessageDialog之后,在Java中重新啟用ToolTips。...
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
public class Main {
public static void main(String args[]) throws Exception {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager
.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};"
+ "Dbq=C:\\Users\\Public\\uls\\ulsTest.mdb;"
+ "SystemDB=C:\\Users\\Public\\uls\\Security.mdw;" + "Uid=Gord;"
+ "Pwd=obfuscated;" + "ExtendedAnsiSQL=1;");
Statement s = conn.createStatement();
s.execute("CREATE USER Tim pwd");
System.out.println("User 'Tim' created.");
s.execute("DROP USER Tim");
System.out.println("User 'Tim' dropped.");
s.close();
conn.close();
}
}