function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ChitraChitra 

Help on Scontrols - Applet

Hello..

I need some help with the Scontrols - Especially with java applets

I am not sure if I am doing it right.. This is my java file

import java.applet.Applet;
import java.awt.Graphics;

public class Scontrol extends Applet
{
 public void paint(Graphics g)
 {
   g.drawString("Scontrol Sample",100,100);
 }
}

And this is my HTML file...

<HTML>
<HEAD>
<TITLE> A Simple Program </TITLE>
</HEAD>
<BODY>
<APPLET CODE="Scontrol.class" WIDTH=150 HEIGHT=100 >
</APPLET>
</BODY>
</HTML>

I uploaded the class file when I created the Scontrol.. I created the reference to this SCtrl in the Page layout too.. What am I missing...???

Where does the applet get loaded from...???

Could it be problem with the applet attributes..??? So .. I am not sure about the applet attributes that needs to be set .. Archives... Java Code Base .. etc..!! I am not sure where I am making mistake..!! ..

Thank you...

Chitra

rchoi21rchoi21

Chitra,

When defining the HTML with the sforce control, there are a set of merge fields to use specifically for java applets. You should be able to find Scontrol_JavaCodebase and Scontrol_JavaArchive to specify the codebase and archive respectively for the jar you uploaded.

As a starter, here's a basic HTML snippet that will print out the values of these merge fields.

<HTML>
<BODY>
Scontrol_JavaCodebase: {!Scontrol_JavaCodebase}
Scontrol_JavaArchive: {!Scontrol_JavaArchive}
Scontrol_URL: {!Scontrol_URL}
</BODY>
</HTML>

Tell us how it goes!