Samples, exercises and tests from the book Head First Java
Basic GUI creation
First steps into GUI creation (window, button) without event handlers
First steps on handling events from GUI components. Add an action to be performed when the button is clicked.
Creates a first DrawPanel with a rectangle inside.
Uses an image file in the JPanel component
Creates a random colored oval over a black background
Type casting of Graphics => Graphics2D and gradient fill
Use of inner classes to implement the same interface for multiple actions. DrawPanel Class created to contain the graphic elements.
Sample animation using inner class.