Well just so I get back into the groove of making tutorials, I am going to make a quick Hello World graphical user interface window. I'm not with my compiler right now and it has been a few weeks since I have worked on a GUI (currently working on an IRCd made in java with services written in tcl{i know lol}
Alright here we go.
Please remember I did this without my compiler(yes, I know this is simple, but also consider I havent done a GUI in a matter of weeks, if not months)
Alright here we go.
import javax.swing.*;Basically this opens a 500x500 window titled "Hello CodeCall"
import java.awt.*;
import java.awt.event.*;
public class helloWorld extends JFrame {
helloWorld(String title) {
this.setSize(500,500);
setTitle(title);
}
public static void main(String[] args) {
helloWorld window = new helloWorld("Hello CodeCall");
window.setVisible(true);
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
Please remember I did this without my compiler(yes, I know this is simple, but also consider I havent done a GUI in a matter of weeks, if not months)
No comments:
Post a Comment