-
Notifications
You must be signed in to change notification settings - Fork 2
/
PILOT.java
112 lines (89 loc) · 2.23 KB
/
PILOT.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
class PILOT extends Thread {
private JFrame f = new JFrame("PILOT");
JPanel p1;
JButton b1;
JButton b2;
JButton b3;
JButton b4;
PILOT() {
start();
}
public void start()
{
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setSize(400,300);
f.setVisible(true);
//p1 = new JPanel();
//p1.setBackground(Color.red);
ImageIcon ii = new ImageIcon("D:\\java\\MIG\\bin\\MISSILES.jpg");
JLabel lable = new JLabel(ii);
JScrollPane jsp = new JScrollPane(lable);
b1 = new JButton("Fight");
b1.setSize(new Dimension(90, 30));
b1.setLocation(50, 10);
b1.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
f.dispose();
new Fight();
}
});
b2 = new JButton("Flight");
b2.setSize(new Dimension(90, 30));
b2.setLocation(250, 10);
b2.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
f.dispose();
new Flight();
//JOptionPane.showMessageDialog(null,"Dialogue");
}
});
b3 = new JButton("Go Back");
b3.setSize(new Dimension(90, 30));
b3.setLocation(50, 220);
b3.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
f.dispose();
new display();
//JOptionPane.showMessageDialog(null,"RUNNING PILOT CLASS");
}
});
b4 = new JButton("Land");
b4.setSize(new Dimension(90, 30));
b4.setLocation(250, 220);
b4.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
f.dispose();
new land();
//JOptionPane.showMessageDialog(null,"RUNNING PILOT CLASS");
}
});
//p1.add(b1);
//p1.add(b2);
//p1.add(b3);
//p1.add(b4);
//p.add(field,BorderLayout.AFTER_LAST_LINE);
//f.add(p1);
f.add(b1);
f.add(b2);
f.add(b3);
f.add(b4);
f.add(jsp);
}
}