Java program to draw a Rectangle using Graphics2D class
KW.java
Output
kodingwindow@kw:~$ javac KW.java
kodingwindow@kw:~$ java KW
What Next?
Java program to create an empty frame as an instance
Java program to print Hello World on a frame
Java program to create an input field on a frame
Advertisement