| 1 |
This example shows how to set up an applet with a button and a
textbox. When the user clicks the button, the contents from the textbox are displayed on the face of the button and are painted on the page.
|
View Code |
Download Code |
| 2 |
This example shows how to draw an image and a line
on the screen. When the user clicks the button, the image moves
to the right and the line is redrawn to the corner of the image. For this
to work you need to put the box.gif image in the folder that contains the
class for your project. Click here to get the image. |
View Code |
Download Code
|
| 3 |
This example shows how to convert a string to a number. When the user clicks the
button, the the number in the textbox is added to a variable and the total is displayed
on the screen. Since data type of contents of the textbox
is a string, its contents must be converted
to a number before adding to the total. |
View Code |
Download Code
|