Java Examples
Note: These examples are stored as compressed zip files. When you click on a link, your web browser should download the zip file and automatically convert it to a folder that can be opened directly in BlueJ. If you are trying this on the computers in Olin 217 and you get an error, it is probably because the browser is trying to save the file to the Desktop, which you do not have access to. Simply open the preferences for the browser and change the download directory to the local directory bearing your name instead.
- Wormhole 1 draws nested ovals, using "magic numbers"
- Wormhole 2 also draws nested ovals, but without using "magic numbers"
- Wormhole 3 also draws nested ovals, but using a custom method and no "magic numbers"
- Gigobite shows how to display widgets
- Calculator using GridLayout for its buttons
- Calculator using null layout for its buttons
- Fraction applet demonstrates a "from-scratch" Fraction class
- Dot applet demonstrates action events
- SketchPad applet demonstrates other kinds of events
- Loop examples: Count, Interest, Circles, Lines
- Sorting animation from the text with insertion, bubble, and shell sorts added
