-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlottoMainUI.java
44 lines (34 loc) · 866 Bytes
/
lottoMainUI.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
import java.awt.Image;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
public class lottoMainUI extends JFrame {
GUIComponent comp = new GUIComponent();
Toolkit tk;
Image img;
public lottoMainUI() {
CreateUI("Random Lotto Picker");
setContentPane(comp.MainUI());
}
public void CreateUI(String Title) {
tk = Toolkit.getDefaultToolkit();
img = tk.getImage("lotto.PNG");
setIconImage(img);
setTitle(Title);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(480,242);
setResizable(false);
setLocationRelativeTo(null);
setVisible(true);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
new lottoMainUI();
}
});
}
}