-
Notifications
You must be signed in to change notification settings - Fork 2
/
EnterPassword.java
executable file
·79 lines (59 loc) · 2.66 KB
/
EnterPassword.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
public class EnterPassword extends WizardPanel {
private java.io.File outputDirectory;
private String password;
/** Creates new form SelectOutputFile */
public EnterPassword(String stepText) {
super(stepText);
initComponents();
setFirstFocusable(passwordField);
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
private void initComponents() {//GEN-BEGIN:initComponents
selectFileLabel = new javax.swing.JLabel();
selectFilePanel = new javax.swing.JPanel();
passwordLabel = new javax.swing.JLabel();
passwordField = new javax.swing.JPasswordField();
setLayout(new java.awt.BorderLayout());
selectFileLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
selectFileLabel.setText("Enter the password and click next to start the extraction");
selectFileLabel.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2));
add(selectFileLabel, java.awt.BorderLayout.CENTER);
selectFilePanel.setLayout(new java.awt.BorderLayout());
selectFilePanel.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2));
passwordLabel.setText(" Password ");
selectFilePanel.add(passwordLabel, java.awt.BorderLayout.WEST);
selectFilePanel.add(passwordField, java.awt.BorderLayout.CENTER);
add(selectFilePanel, java.awt.BorderLayout.SOUTH);
}//GEN-END:initComponents
public boolean doValidation() {
password = new String(passwordField.getPassword());
if( password.trim().length() == 0 ){
javax.swing.JOptionPane.showMessageDialog(this,"Enter a password/phrase");
passwordField.requestFocus();
return false;
}
return true;
}
/** Getter for property outputDirectory.
* @return Value of property outputDirectory.
*/
public java.io.File getOutputDirectory() {
return outputDirectory;
}
/** Getter for property password.
* @return Value of property password.
*/
public String getPassword() {
return password;
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel selectFileLabel;
private javax.swing.JPasswordField passwordField;
private javax.swing.JLabel passwordLabel;
private javax.swing.JPanel selectFilePanel;
// End of variables declaration//GEN-END:variables
}