Source Code
Posted on
September 9th, 2008 0 Comments
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 on leap day.)
/*******************************************************
* MYCPLUS Sample...
Read More |
Make a Comment
Posted on
September 9th, 2008 0 Comments
A custom component that lets the user select a color. The available colors are bright, saturated colors in a full range of hues. The possible colors are shown in a strip. The user clicks on this strip to select a color. The selected color is hilited with a white frame. A program that uses this component can find out which color is currently selected by calling...
Read More |
Make a Comment
Posted on
September 9th, 2008 0 Comments
A simple Java Calculator
/*******************************************************
* MYCPLUS Sample Code - http://www.mycplus.com *
* *
* This code is made available as a service to our *
* visitors and is provided strictly for the *
* purpose of illustration. ...
Read More |
Make a Comment
Posted on
September 9th, 2008 1 Comment
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 346 pixels high. That width is just big enough to show 2 rows of 5 cards. The height is probably...
Read More |
Make a Comment
Posted on
September 9th, 2008 0 Comments
This short program demonstrates the URL and URLConnection classes by attempting to open a connection to a URL and read text from it. The url must be specified on the command line. If an error occurs, a message is output. Otherwise, the text from the URL is copied to the screen.
/*******************************************************
* MYCPLUS Sample...
Read More |
Make a Comment
Posted on
September 9th, 2008 0 Comments
A ColorChooserApplet shows six scroll bars that the user can manipulate to set the red, gree, blue, hue, brightness, and saturation components of a color. A color patch shows the selected color, and there are six labels that show the numerical values of all the components. RGB components are specified as integers in the range 0 to 255.
HSB components are specified...
Read More |
Make a Comment
Posted on
September 9th, 2008 0 Comments
A simple Drawing Pad on which the user can draw some lines and shaps by using the mouse.
/*******************************************************
* MYCPLUS Sample Code - http://www.mycplus.com *
* *
* This code is made available as a service to our *
* visitors and is provided strictly for the...
Read More |
Make a Comment
Posted on
September 9th, 2008 0 Comments
Text Tool
/*******************************************************
* MYCPLUS Sample Code - http://www.mycplus.com *
* *
* This code is made available as a service to our *
* visitors and is provided strictly for the *
* purpose of illustration. *
* ...
Read More |
Make a Comment