|
|
|
|
Getting Started : The Hello World Applet
|
|
Step by Step
Import the main figue package.
Import the box package.
Import the path package.
Create the usual java applet.
|
public class MyApplet extends java.applet.Applet { |
Keep a reference to an AWT facade.
|
private AWTFacade _facade; |
Initialize the AWT facade.
|
public final void init() {
...
_facade = new AWTFacade(); |
Add the facade's AWT component to the layout.
|
add(_facade.getAwtComponent()); |
Build an atom.
|
final GlyphInterface theMessage = Atom.newAtom("Hello World"); |
Create a modification path.
|
PathInterface thePath = new Path(); |
Add the atom to the path.
|
thePath.addOperation(new InsertGlyph(theMessage,0)); |
Apply the path to the facade.
|
_facade.buildInit(thePath);
_facade.buildComplete(); |
Free all resources when done.
|
public final void destroy() {
_facade.disposeWhenInactive();
_facade = null;
...
super.destroy(); |
|
|
Example
- Accelerators :
- home, end, page up, page down, left arrow,right arrow, up arrow, down arrow.
- Autoscrolling :
- drag the mouse inside the
text area, approach a border or a corner, and wait.
|
|
|
Related Classes
and Methods
|
|
|
What Next ?
Now you can :
|
|
|
|
|
|
|
|
|