|
|
Java Student Project |
||
|
|||
| Message | |||
|
|
|
||
| Ability Level: | Beginner | ||
|
|
|
||
| Estimated Time: | 45 minutes | ||
|
|
|
||
| Objectives: |
|
||
|
|
|
||
| Materials & Resources: |
|
||
|
|
|
||
| Overview: | Write
an applet which will print out a message from a web browser.
Your text should use a different color text, different font, be bold, and italicized.
Be positive with your message! Do not use the example font or color.
|
||
|
|
|
||
| Instructions: |
|
||
|
|
|||
| Hints: | 1. Import is necessary to include library
files. Be sure to include Applet. An example : import java.awt.Color; 2. Class must be declared with the name and extends Applet to
indicate Applet is being
created. 3. A method (like a function in C++) is needed for each
constructor, which is a block of code whenever a new object is
created. Open and close braces enclose the code. 4. To use graphics the method must be declared. 5. There are many commands available such as g.setFont, g.setColor, and g.drawString which should be used in the paint method. 6. The pipe character ( | ) is used for "or" and allows the use of two different font sets. The pipe is generally the shift of the backslash on most keyboards. 7. Color uses red, green, blue sequentially. The maximum
color is 255 and the minimum is 0. Three parameters are
necessary. |
||