-
Notifications
You must be signed in to change notification settings - Fork 0
/
Exit.java
63 lines (54 loc) · 3.11 KB
/
Exit.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
import java.awt.Container;
import javax.swing.*;
public class Exit extends JFrame {
Exit() {
initComponents();
}
void initComponents() {
ex1 = new JLabel();
ex2 = new JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
setUndecorated(true);
setResizable(false);
setTitle("Thanks");
Container contentPane = getContentPane();
ex1.setText("Thanks For Playing ! ! !");
ex2.setText("Have a nice day ahead ! ! !");
GroupLayout contentPaneLayout = new GroupLayout(contentPane);
contentPane.setLayout(contentPaneLayout);
contentPaneLayout.setHorizontalGroup(
contentPaneLayout.createParallelGroup()
.addGroup(contentPaneLayout.createSequentialGroup()
.addContainerGap()
.addGroup(contentPaneLayout.createParallelGroup()
.addGroup(contentPaneLayout.createSequentialGroup()
.addGap(26)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ex1, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED))
.addGroup(contentPaneLayout.createSequentialGroup()
.addGap(26)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ex2, GroupLayout.PREFERRED_SIZE, 170, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)))
.addContainerGap(11, Short.MAX_VALUE))
);
contentPaneLayout.setVerticalGroup(
contentPaneLayout.createParallelGroup()
.addGroup(contentPaneLayout.createSequentialGroup()
.addContainerGap()
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGap(63)
.addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(ex1, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
.addGap(23)
.addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(ex2, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE))
.addGap(43)
.addContainerGap(15, Short.MAX_VALUE))
);
pack();
setLocationRelativeTo(getOwner());
}
JLabel ex1, ex2;
}