Example Programs to Help With Final Project
The NTJFrame class. Just download this class to the directory where you are saving the examples and compile it. Then any of the samples here should run.
A program that demonstrates some methods for drawing graphics
This program shows you how to use a mouse using MouseAdapter
This program makes a timer
This timer lets you stop and start it using a button
This version lets you stop and start the timer using the right mouse button
This program demonstrates how to use polygons to detect hits
graphic for Mouse & Polygon Demo
You can use multiple buttons in a program
graphic for Multiple Button Demo
This program can detect which square on a grid is clicked and display an image
graphic for Mouse & Graphics Demo
You can make your own dialog boxes
Buttons in a Grid Demo
0.jpg
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
Using Several Different GUI Objects
Shoot.java