forked from Ashish8104/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrame3.java
More file actions
50 lines (40 loc) · 1.15 KB
/
Frame3.java
File metadata and controls
50 lines (40 loc) · 1.15 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
import java.awt.*;
import java.awt.event.*;
class Frame3 extends Frame
{
public Frame3(){
super("WELCOME PAGE");
prepareGUI();
}
public static void main(String[] args){
Frame3 f3 = new Frame3();
f3.setVisible(true);
}
private void prepareGUI(){
setSize(600,400);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent windowEvent){
System.exit(0);
}
});
}
@Override
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D)g;
Font boldFont = new Font("Times New Roman", Font.BOLD, 40);
g2.setFont(boldFont);
g2.drawString("SELECTION", 50, 70);
Font boldFont2 = new Font("Times New Roman", Font.BOLD, 16);
g2.setFont(boldFont2);
g2.drawString("ALREADY HAVE AN ACCOUNT CREATE NEW ACCOUNT", 50, 200);
Button b1 = new Button("SIGNIN");
b1.setBounds(100,300,70,30);
Button b2 = new Button("SIGNUP");
b2.setBounds(200,300,70,30);
Button b3 = new Button("Back");
b3.setBounds(150,350,70,30);
add(b1);
add(b2);
add(b3);
}
}