Microsoft SDK for Java

AFC102 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.

The AFC 1.0.2 samples are compatible with the Java Development Kit (JDK) 1.0.2. In order to run the AFC 1.0.2 samples, you must install the Microsoft SDK for AFC This link takes you to a site on microsoft.com.

The AFC 1.0.2 samples work with Netscape Navigator 3.04, Netscape Communicator 4.03, and Netscape Communicator 4.04 (without the Netscape Java 1.1 developer patch). The behavior exhibited under non-compatible browsers is the closing of the browser without warning.

Versions of these samples that are compatible with JDK 1.1 are also provided in the \Samples\afc11 directory.

The following AFC 1.0.2 samples are provided.

Sample Description
AFC Detect Location: \Samples\afc102\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\afc102\BandsnMenus

Technologies: AFC

Demonstrates:

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

Technologies: AFC

Demonstrates:

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

Technologies: AFC

Demonstrates:

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

Technologies: AFC

Demonstrates:

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

Technologies: AFC

Demonstrates:

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

Technologies: AFC

Demonstrates:

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

Technologies: AFC

Demonstrates:

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

Technologies: AFC

Demonstrates:

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

Technologies: AFC

Demonstrates:

  • Using AFC classes to create and manipulate various types of static controls.
Viewers Location: \Samples\afc102\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.