RGB Color Chooser Applet – Java

A RGBColorChooser shows three sliders that the user can manipulate to set the red, green, and blue, components of a color. A color patch shows the selected color, and there are three labels that show the numerical values of all the components. Values are in the range...

Ouputs the Zodiac signs

Ouputs the Zodiac sign corresponding to a given date. Java /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided strictly for the *...

Laout managers applet demo

This applet demonstrates various layout managers. The applet itself uses a border layout with a JPanel in the center, a JComboBox menu to the North, and a JLabel to the south. The center panel uses a CardLayout. Each card in the card layout contains a number of...

Mouse Events Information Applet

A simple applet that displays information about mouse events as they occur. Since double-buffering is not used, the display flickers quite a bit. Java /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This...

Download Upload Statistics Manager

This program is for those who have a fixed limit for downloading/uploading. It creates and saves the statistics of the numerical value passed by the user. Before use the user needs to create 2 text files every month. One named : stats<monthnumber>.txt and...

Moving ball applet – Java

An object of type MovingBall holds data about a “ball” that has a color, radius, position, speed, and direction. The ball is restricted to moving around inside a rectangle in the xy-plane. The ball can draw itself in a graphics context and will move when...

Process Binary Trees – Java

This program demonstrates a few routines for processing binary sort trees. It uses a binary sort tree of strings. The user types in strings. The user’s string is converted to lower case, and — if it is not already in the tree — it is inserted into...

Simulation of console-I/O program BirthdayProblemDemo

Simulation of console-I/O program BirthdayProblemDemo, using ConsoleApplet as a basis. See the file ConsoleApplet.java for more information. David Eck eck@hws.edu Java /******************************************************* *...

Stop-Watch Java Program

A component that acts as a simple stop-watch. When the user clicks on it, this componet starts timing. When the user clicks again, it displays the time between the two clicks. Clicking a third time starts another timer, etc. While it is timing, the label just displays...

BirthdayProblem Demonstration

How many random people do you have to select before you find a duplicate birthday (that is, two peole who were born on the same day of the same month, but not necessarily in the same year). This program simulates the process. (It ignores the possibility of people born...

Count the words in a file – Java

This program will read words from an input file, and count the number of occurrences of each word. The word data is written to an output file twice, once with the words in alphabetical order and once with the words ordered by number of occurrences. The input and...

Blackjack Java Game

In this applet, the user plays a game of Blackjack. The computer acts as the dealer. The user plays by clicking “Hit!” and “Stand!” buttons. The programming of this applet assumes that the applet is set up to be about 466 pixels wide and about...