Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ds.setURL(jdbcUrl);if(conn == null) {
- // Display a message to get the password from the user
- JLabel label = new JLabel("Oracle Username: ");
- JTextField jtf = new JTextField();
- JLabel label2 = new JLabel("Oracle Password:");
- JPasswordField jpf = new JPasswordField();
- JOptionPane.showConfirmDialog(null,new Object[]{label, jtf, label2, jpf}, "Password:",
- JOptionPane.OK_CANCEL_OPTION);
- String password = String.valueOf(jpf.getPassword());
- conn = ds.getConnection(jtf.getText(), password );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement