-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
19 lines (15 loc) · 700 Bytes
/
Main.java
File metadata and controls
19 lines (15 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import javax.swing.*;
public class Main extends JFrame {
Main() { // Constructor
this.setResizable(false); // Prevents window from being resized
this.add(new App()); // Adds the App.java class to the JFrame
this.setTitle("Raycasting"); // Sets the title of the window
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Allows the window to be closed
this.pack(); // Sizes the window so that all its contents are at or above their preferred sizes
this.setVisible(true); // Makes the window visible
this.setLocationRelativeTo(null); // Centers the window
}
public static void main(String[] args) {
new Main();
}
}