-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathFrame2.java
More file actions
40 lines (34 loc) · 980 Bytes
/
Frame2.java
File metadata and controls
40 lines (34 loc) · 980 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
30
31
32
33
34
35
36
37
38
39
40
import java.awt.*;
import java.awt.event.*;
class Frame2 extends Frame
{
public Frame2(){
super("WELCOME PAGE");
prepareGUI();
}
public static void main(String[] args){
Frame2 f2 = new Frame2();
f2.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, 28);
g2.setFont(boldFont);
g2.drawString("WELCOME TO THE PROJECT", 50, 70);
Font boldFont2 = new Font("Times New Roman", Font.BOLD, 40);
g2.setFont(boldFont2);
g2.drawString("Made By MEENAL JAIN", 50, 200);
Button b = new Button("Next");
b.setBounds(150,300,70,30);
add(b);
}
}