Microsoft KB Archive/288824

= How To Display a WFC Form in a Visual J++ Applet =

Article ID: 288824

Article Last Modified on 8/5/2004

-

APPLIES TO


 * Microsoft Visual J++ 6.0 Standard Edition, when used with:
 * Microsoft Windows 2000 Standard Edition

-



This article was previously published under Q288824



SUMMARY
The WFCApplet.exe sample demonstrates how to load a Windows Foundation Classes (WFC) form in a Visual J++ 6.0 applet.

Note Because the Visual J++ graphical user interface (GUI) designer does not work for applets, you must create the form as a WFC control. You can only use WFC under Microsoft Windows operating systems with the Microsoft virtual machine for Java (Microsoft VM). Also, you cannot use WFC controls directly in an applet, or else the applet simply instantiates the form because there is no inherent relationship between the form and the applet. To use WFC controls, you must place the controls in a WFC container.



MORE INFORMATION
The following file is available for download from the Microsoft Download Center:

WFCApplet.exe

Release Date: Mar-13-2001

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. The WFCApplet.exe sample contains the following files:

How to Use the WFCApplet.exe Sample
This sample demonstrates the use of WFC controls on a Java applet and how to install this applet into the Java Package Manager.

Note You do not put the WFC controls directly onto the applet area. You must create a WFC form and drop the controls on the form. When you run the applet, the Form window appears on top of the Microsoft Internet Explorer window.

This sample contains the Visual J++ 6.0 project, including two .htm files: Local.htm, which you use from the Visual J++ 6.0 Integrated Development Environment (IDE), and WFCApplet.htm, which you use for deployment to a Web server.

There are only two Java classes in this project: WFCApplet.java, which is a simple applet class that creates the WFC form, and WFCAppletForm.java, which is the WFC form class.

Using the WFCApplet.htm file, clients are prompted to install the Microsoft VM if they do not have the latest version. If they must update the Microsoft VM, the clients must also restart their computers after installation. Then, the two classes are installed into the Package Manager on the client computer to offer versioning, in the likely event that you will need to upgrade the package someday.

For additional information on installing classes into the Java Package Manager, click the article number below to view the article in the Microsoft Knowledge Base:

179652 How To Deploy Java in Internet Explorer 4.0 and Netscape 4.0

Caution After you run WFCApplet.htm, these classes are installed into the Package Manager and are located on the classpath before any new versions of the classes, even when you make subsequent changes through Visual J++ 6.0. To prevent this, go to the WINNT\Downloaded Program Files folder. Select and then right-click WFCApplet, click Remove, and then click Yes.

Additional query words: WFCApplet

Keywords: kbdownload kbdownload kbcab kbcode kbdownload kbfile kbhowto kbsample kbwfc KB288824

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.