In this project I learned to code a graphical user interface with Java Swing using absolute positioning. Together the widgets draw either a circle or square of the user's desired size and positioning using a single actionListener. We were not required to code validation or write test code.
ShapDrawing.java - GUI constructor, private inner class, and a Main
The build instructions to make myFirstGui work.
- Copy Java file into its own class with matching name.
- Run program from ShapeDrawing class.
- Non-integer data input in rhw JTextFields will cause an exception when button clicked, but qill not crash program.
Draws a red, green, or blue circle or square between 100-400 pixels. Ex: Output1.jpg, Output2.jpg, Output3.jpg.