-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathPasswordF.java
More file actions
29 lines (27 loc) · 781 Bytes
/
PasswordF.java
File metadata and controls
29 lines (27 loc) · 781 Bytes
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
package advJava;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class PasswordF extends JFrame {
JLabel l1;
JPasswordField k1;
JComboBox cb;
JTextArea a1;
JPanel jp;
PasswordF(){
setSize(400,400);
setBackground(Color.BLUE);
setVisible(true);
a1 = new JTextArea(5,10);
jp = new JPanel();
String Country[] = {"USA", "India", "Japan", "Pakistan"};
cb = new JComboBox(Country);
l1 = new JLabel("Enter the password");
k1 = new JPasswordField();
setLayout(new FlowLayout());
add(l1);add(k1);add(jp);jp.add(a1);add(cb);
}
public static void main(String args[]){
PasswordF obj = new PasswordF();
}
}