Poor Man's Paintshop

For those so empoverished that they can only run Java programs...

The Java VM is now constantly using megabytes of swap space on your machine

 

Poor Man's Paintshop

How poor do you have to be to not be able to afford a copy of JASC's PaintShop Pro, considering that the 60-day trial is free? Pretty poor. I'm not really talking about money here. You're poor in the unfortunate way because your inability to use PaintShop probably means your running some godawful operating system like Solaris and can't get any quality software at all to run on your machine. You need to edit images. You are desperate. You'll use anything. You're the only person who would want to use this program for creating anything but avant guard art. For the rest of you, I imagine that this well commented chunk of a Java vector image editor will be of great instructional use.

Poor Man's Paintshop, or MiniDraw, as it was called in school was a project that I did for my CS108 class freshman year. Being a foolish procrastinator, I, of course, waited until the last minute to actually do it and ended up coding for fifteen hours straight through the night before this puppy was due. You're not a real programmer until you've seen the moon rise and fall in the same coding session :-). MiniDraw is a MDI vector graphics creation program that allows the loading of saving of images in XML and exports pictures to PGN format. As a drawing program, it's one of the quintessential inheritence projects to do for a programming course. And as far as pathetic little Java draw programs go, this one is on the top of the heap.

- August 2002

A Note on the Source Code


First off, I should put in a little disclaimer about the authorship of this code. This was an assignment that I did as a freshman last year for CS108, Stanford's object-oriented programming class. We were provided with a skeleton of interfaces and utility functions and instructed to complete the project. So a good deal of credit (I daresay all) as far as architecting the structure of the code belongs to my professor, Nick Parlante, and the rest of the CS108 staff. That being said, I wrote perhaps 70-80% of the working code, so I feel justified in claiming some credit too :-).

In order to run this program, you'll need a Java compiler and an implementation of the SWING (GUI stuff) library for your platform, a copy of the JiniPro classes for image handling, and XALAN for the XML things (see the imports). I believe that these are all available at Sun's website, provided that they're still in business. If you have problems getting this stuff set up, please don't ask me. I hate the brain-damaged way in which Java programs have to be set up just so before they will deign to compile. Hearing about your plight will only ruin my day. Complain to Sun instead, providing that they're still in business. If memory serves, KDeskFrame is the main class for the program, though some of the other classes have test mains. This program is a lot better than some of my others for learning from because the source is rather well commented. Good luck and have fun!

NOTE: If you are a Stanford student taking CS108 or an equivalent class wherein programming a MiniDraw-like project is a class requirement, DO NOT download this code, even to just peruse it. Not only is it a violation of the honor code, but the CS department runs all submitted code through tools that are very good at finding programs that are even semantically similar to previously submitted material. It's dumb. Don't do it.

 

Code Download

Poor Man's Paintshop Source

 

Links

Shedletsky's Code Library

The Nexus