-
Notifications
You must be signed in to change notification settings - Fork 0
/
car_policy.java
59 lines (44 loc) · 1.22 KB
/
car_policy.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
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javafx.stage.WindowEvent;
import java.lang.*;
public class car_policy extends JFrame
{
JButton plans,back;
JLabel lbl2;
Font f1,f2;
ImageIcon img;
MyActionListener1 ml = new MyActionListener1(this);
car_policy()
{
super("Car insurance policy");
setLayout(null);
setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH);
img = new ImageIcon("Car policy.png");
lbl2 = new JLabel(img);
lbl2.setBounds(0,0,img.getIconWidth(), img.getIconHeight());
lbl2.setVisible(true);
plans= new JButton(" GET PLANS ");
back= new JButton("< List ");
f1 = new Font("Segoe UI Black",Font.BOLD,30);
f2 = new Font("Segoe UI Black",Font.BOLD,20);
back.setFont(f2);
plans.setFont(f1);
add(lbl2);
add(back);
add(plans);
back.setBounds(50,50,200,75);
plans.setBounds(1300,800,300,100);
back.addActionListener(ml);
plans.addActionListener(ml);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent we)
{
System.exit(0);
}
});
}
}