Some of these examples are in JDK 1.0. You should always use the most current version of Java and only look at the 1.0 stuff for insights.
Producer/Consumer example code for the Producer, the Consumer, and the Monitor. Putting them all together. .
You do not have to use any animation in this lab, but often people do. For this reason, I am including this information: The class MediaTracker (and 1.5) is a useful class for animations. (Although it looks like java 2D and Image I/O (its guide) is the thing to use these days... See also here.) It monitors the loading process of multiple images and audio files. The getImage methods in Java loads images asynchronously in another thread so when it returns, the image may not have completely loaded. Basically MediaTracker allows you to wait for any supported media including Images, to finish loading, so that you can be sure it's available when you want to use it. Finally, here is an example of its use. (Interesting - things must be faster these days! Here is what it was.). This tutorial page used to be on animation. It might be helpful too - but I downloaded the old one that used to be there (I got the slower duke from here - you can see it with Swing code )
Here are some lab examples. I do not know how many are still valid links: Example products: Java 2 Labs. Also see animated pizza producer/consumer
You must identify how your lab is satisfying the specification:
i.e., what is the producer, what is the consumer, what is the monitor
See this email if you are concerned.
Thread Deadlock and the Dining Philosophers. (A copy that worked.) This was from the
tutorial you probably forgot about here
Lab 3: Client/Server Systems
Lab 4: Database