Microsoft SDK for Java

AFC11 Samples

The Microsoft Application Foundation Classes (AFC) is a set of Java class libraries that provide user interface components and graphics effects for use in Java applets and applications. For additional information on AFC, see the Microsoft SDK for AFC.

AFC samples located in the \Samples\Afc11 directory are compatible with the Java Development Kit (JDK) 1.1. (A subset of these samples, compatible with JDK 1.0.2, is also provided in the \Samples\afc102 directory.) The AFC 1.1 samples are compatible with Netscape Communicator 4.06 through 4.08 and Netscape Communicator 4.5. Netscape 4.04 is compatible only where the Netscape Java 1.1 developer patch has been installed. The behavior exhibited under non-compatible browsers is the closing of the browser without warning.

The following AFC 1.1 samples are provided.

Sample Description
AFC Detect Location: \Samples\Afc11\AFCDetect

Technologies: AFC, packaging

Demonstrates:

  • Using the com.ms.util.SystemVersionManager class to retrieve package version information and take appropriate actions (such as installing new package versions). The sample determines whether AFC is installed on a computer and which version is installed.
Bands and Menus Location: \Samples\Afc11\BandsnMenus

Technologies: AFC

Demonstrates:

  • Using AFC graphics and effects classes to create and manipulate bands, buttons, menus, and scrollable viewers.
Buttons Location: \Samples\Afc11\Buttons

Technologies: AFC

Demonstrates:

  • Using AFC graphics and effects classes to create various types of button controls.
FxShapes Location: \Samples\Afc11\FxShapes

Technologies: AFC

Demonstrates:

  • Using the various pen lines, shapes, and styles provided by the com.ms.fx package.
FxTextures Location: \Samples\Afc11\FxTextures

Technologies: AFC

Demonstrates:

  • Using the texture options provided by the com.ms.fx.FxTexture class.
JNotepad Location: \Samples\Afc11\JNotepad

Technologies: AFC

Demonstrates:

  • Using AFC classes to create complete applications. The sample is a full-featured text editor.
JTreeVue Location: \Samples\Afc11\JTreeVue

Technologies: AFC

Demonstrates:

  • Using AFC components to build a class hierarchy tree.
Lists Location: \Samples\Afc11\Lists

Technologies: AFC

Demonstrates:

  • Using the various list types and selection options provided by AFC's UIList controls.
Loan Calculator Location: \Samples\Afc11\LoanCalc

Technologies: AFC

Demonstrates:

  • Using AFC classes to create applets or applications that use wizards for user input.
Puzzle 15 Location: \Samples\Afc11\Puzzle15

Technologies: AFC

Demonstrates:

  • Using AFC classes to create property sheets and various types of UI controls.
Scrolls Location: \Samples\Afc11\Scrolls

Technologies: AFC

Demonstrates:

  • Using AFC classes to create scroll, spin box, slider, and progress monitoring controls.
Statics Location: \Samples\Afc11\Statics

Technologies: AFC

Demonstrates:

  • Using AFC classes to create and manipulate various types of static controls.
Viewers Location: \Samples\Afc11\Viewers

Technologies: AFC

Demonstrates:

  • Using AFC classes to create various types of viewers.

  • Using classes in the com.ms.object and com.ms.object.dragdrop packages to provide drag-and-drop functionality.

  • A com.ms.ui component hosting an AWT component, and an AWT component hosting a com.ms.ui component.

The following additional samples also demonstrate how to use AFC:

Sample Description
AFC Bean Location: \Samples\ActiveX\AFCBean

Technologies: ActiveX, AFC

Demonstrates:

  • Writing a pure AFC object and hosting it inside an ActiveX container.
Class Decoder Location: \Samples\Wfc\ClassDecoder

Technologies: WFC, AFC, COM, J/Direct

Demonstrates:

  • Building a WFC application.

  • Decoding Java class files into the attributes, structures, and properties that make up the class.
Organization Tree Location: \Samples\Scripting\orgtree

Technologies: Scripting, ActiveX, AFC

Demonstrates:

  • Controlling an applet through scripting.

  • Hosting a JavaBean in an ActiveX container.
SampleBean Location: \Samples\ActiveX\SampleBean

Technologies: ActiveX, AFC

Demonstrates:

  • Creating a JavaBean that handles simple events and can be added as a control to an ActiveX container.
Win32 Resource Loading Location: \Samples\Windows\Win32ResSupport

Technologies: Windows, AFC, internationalization, packaging

Demonstrates:

  • Using the supported Microsoft® Win32® resource styles and controls included with the Win32ResourceDecoder class in the com.ms.ui.resource package.

  • Using Win32 resource (.res) files to develop multilingual applications.

  • Using the resmerge tool to combine multiple Win32 resource files into a single file.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.