-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrame.java
More file actions
30 lines (27 loc) · 882 Bytes
/
Frame.java
File metadata and controls
30 lines (27 loc) · 882 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
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import java.util.*;
import java.io.*;
class Frame extends JFrame {
Graphic g;// = new Graphic();
Frame() {
setTitle("Genetic Algorithm");
setExtendedState(JFrame.MAXIMIZED_BOTH);
setUndecorated(true);
setVisible(true);
g = new Graphic(getWidth(),getHeight());
setResizable(false);
add(g);
}
public static void main(String[] args) {
try {
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File("Assets/American Captain.ttf")));
} catch (IOException|FontFormatException e) {
System.err.println("Could not create Font");
}
new Frame();
}
}