![]()
(chat, newsreader, calendar)
|
![]() |
|
|
|
Course Notes Table of Contents Exercises | Online Training Index
|
|
Help: Creating The First Beans with Kaidi
MageLang Institute
|
|
Help is available for each task, or you can go straight to
the solution source code.
The basic design pattern for Bean properties is: public void setPropertyName (PropertyType value); public void PropertyType getPropertyName(); The routines should be named something like getMessage and setMessage. The getMessage method should return the current message text. The setMessage method changes the current text. Don't forget to call repaint when the message changes. Task 2Compile the file.Make sure the JDK's bin directory is in your PATH. javac KivaHan.java Task 3Now that you've created your first Bean, save the KivaHanTester.java applet that uses it. For now, don't worry about providing a means to change the default message.Shift-click on the KivaHanTester.java link to save. Task 4Compile the file.javac KivaHanTester.java Task 5Save the KivaHanTester.html applet loader.Shift-click on the KivaHanTester.html link to save. Task 6Use appletviewer to display the load the applet loader file.appletviewer KivaHanTester.html
|
|
Copyright © 1997 MageLang Institute. All Rights Reserved May-97 Copyright © 1996, 1997 Sun Microsystems Inc. All Rights Reserved |