← Teach Yourself Java in 21 Days 1996

Teach Yourself Java in 21 Days 1996

From the originals

13 scans

Machine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.

These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.

PDF page 12

Teach Yourself JAVA in 21 Days Overriding Methods ... ............ ... ......... .... ..... ....... ......... ...... ........... .......... 119 Creating Methods that Override Existing Methods .. ................. ......... 119 Calling the Original Method .. ........ ........... ...... .... .................. ............ 121 Overriding Constructors .... .... .. ....... ......... .............. ........... ....... .......... 122 Finalizer Methods ..... .......... .............................................. ...................... 123 Summary ........ ... ............ ......... .... ...... ........... .... ... .............. ................ ...... 124 Q&A ...................................................................................................... 124 Week 2 at a Glance 127 Day 8 Java Applet Basics 129 How Applets and Applications Are Different ................. ......... .. ...... ........ 130 Creating Applets ... ..... ........... .......................... ........................................ 131 Major Applet Activities ... ...................... ..... .... ..... ...... .. ............ ... ........ 132 A Simple Applet ......................................................... .... .................... 134 Including an Applet on a Web Page .... ....... .. .............. ......... .............. ...... 136 The <APPLET> Tag ..... ...................... ........ .......... .................... ..... .. .. 136 Testing the Result ................... .. .... ..... ....... .. ... ... ......... ..... ......... ..... ..... 137 Making Java Applets Available to the Web .............................. ........... 137 More About the <APPLET> Tag ... ...................................... ............. ...... 138 ALIGN .... ... .... ...... ..... ......... ... .... ...... ..... ... .. .......... ..... ....... ..... ............. 138 HSPACEand VSPACE ...... ....... ... ................. ... ... .... .. ... ... .. ...... ....... .... 140 CODEand CODEBASE .... .... ....... ...... ..... ...... ... ..... ...... ..... ..... ..... ..... .. 141 Passing Parameters to Applets ....... .. ........... ...................... ....................... 141 Summary ....... .............. ........................ .......................... .................... .... . 146 Q&A ...................................................................................................... 147 Day 9 Graphics, Fonts, and Color 149 The Graphics Class .. .................. ..... ................... ....... .............................. 150 The Graphics Coordinate System .. ............... ..... ............ .................... 151 Drawing and Filling ..... ................... ............ ........... ..................... ........... 151 Lines ... ... .... ...... ........ ...................... ..... ...... ........... .............. ............... . 152 Rectangles ..... ........... ............. .............. .................... ..... ....... ...... ...... ... 152 Polygons .. .................................... ..... ........... ... .. ......... .... ..... ....... ........ 155 Ovals .............. ...... ................. ........ ....... ...... ... ........... ....... ....... ...... ..... 156 Arc ...... ... ......... ........ ....... ....... ............................................................. 157 A Simple Graphics Example ......... ......... ......... .... ........ .... ......... ..... ... : .. 161 Copying and Clearing ..... .... ................................. ... ........................... 163 Text and Fonts .. ....... ..................... ....... ........... ....... ....... ........... .......... .... 163 Creating Font Objects ............. ....... ............. ....... .... .......... ...... ........ ... 163 Drawing Characters and Strings ... ............... ... ....... ........... .................. 164 Finding Out Information About a Font ......... .. ... .... .. ........ ... .............. 166 Color ... .... .... ...... ...... ................. .. ........... ............. ..... .... ............... ........ .... 168 Using Color Objects ...... ....................... ...... ..................................... .. 168 Tes ting and Setting the Current Colors ............................... .............. 169 A Single Color Example .............. ........ ... ... .. ... ......... ........... .... ............ 170 Summary .......... ...................... ......... ...... .. .................................... ........... 171 Q&A .................................................................................... .................. 171 xii

Reading notes: Table of contents page numbers and dot leaders are present; page references are not separate content fields.

Languages
English