Skip to content

brandondombrowsky/myFirstGUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

36fa246 · Jan 13, 2022

History

22 Commits
Dec 24, 2021
Jan 13, 2022

Repository files navigation

myFirstGUI

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.

Output1.jpg

Included src file containing single class:

ShapDrawing.java - GUI constructor, private inner class, and a Main

Build instructions:

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.

Code output:

Draws a red, green, or blue circle or square between 100-400 pixels. Ex: Output1.jpg, Output2.jpg, Output3.jpg.

Output2.jpg

Output3.jpg

About

In my first GUI I...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages