Application: DrawingPad: Garage Doodler

This Swing GUI application is comprised of two separate but related bits of functionality. The main thing it does is it allows the user to draw freehand on a canvas, and then captures and saves the doodle as an image file. To get this functionality, we use the ImageIO class, available since SDK 1.4. The second thing this app does is it allows you to open an image file from your hard drive and view it in the frame.

This application is worth looking over. It may seem long at first, but there are a lot of comments in this sucker. I think that Swing apps can be fairly confusing for a number of reasons. One reason is that Sun has frequently updated the APIs that are used to make GUIs. That means that you often ...

Get Java Garage now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.