-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscreen.java
More file actions
51 lines (37 loc) · 1.06 KB
/
screen.java
File metadata and controls
51 lines (37 loc) · 1.06 KB
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
import javax.swing.*;
import java.awt.event.*;
public class screen extends JFrame {
private JPanel panel,panel1;
private JButton button;
private JLabel label;
private JTextField server_id,username_id,password_id,extention_id;
private int totalClicked;
public void screen(){
totalClicked = 0;
//setup JFrame
this.setSize(400,400);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setLocationRelativeTo(null);
panel = new JPanel();
button = new JButton("Enter");
server_id = new JTextField(10);
extention_id = new JTextField(10);
username_id = new JTextField(10);
password_id = new JTextField(10);
label = new JLabel(" ");
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
label.setText("enter is clicked " + totalClicked);
totalClicked++;
}
});
panel.add(button);
panel.add(label);
panel.add(server_id);
panel.add(extention_id);
panel.add(username_id);
panel.add(password_id);
this.add(panel);
this.setVisible(true);
}
}