What Is Going On Jun 24, 2019 What exactly is going on in this life we live in? I do not know. I haven’t the faintest idea of anything that happens. I simply know I am living here and is that enough? Is that enough to make things work? Is it enough to enable life to be something better than it is? I do not know. I simply don’t have any idea of what is going on. I don’t understand or realize any of it. I wish I did. Yet here we are waiting for something better to come around. Something much much better to have an understanding of. Is that not the end goal of life? To better understand each other and ourselves as much as possible?
There are two kinds of programs in Java. One that runs on the commandline. The other runs as a GUI. Today we'll be focusing on GUIs.
In order to work with a GUI, first you need to create a window. We use a JFrame in order to do this.
import javax.swing.JFrame;
public class Window extends JFrame {
public Window() {
super("My Window");
setSize(640, 480);
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
setVisible(true);
}
public static void main(String[] args) {
new Window();
}
}
Comments
Post a Comment