Link to home
Start Free TrialLog in
Avatar of shapeless
shapeless

asked on

Label text doesn't show up in a applet created with Visual J++

The first day I am using the Visual J++. I tried to create an applet with the following code :

<APPLET
class=HelloVisualJ
style="LEFT: 0px; VISIBILITY: visible; TOP: 0px"
name=HelloVisualJ
code=HelloVisualj.class
width=320 height=200>

  <PARAM NAME="foreground" VALUE="FFFFFF">
  <PARAM NAME="background" VALUE="008080">
  <PARAM NAME="label" VALUE="This string was passed from the HTML host."> //<=== Line (A)
</APPLET>

Also, in the code of the applet, I inserted :

  public void paint(Graphics p1)
  {
    p1.drawString("My First Visual J++ Applet", 10,35); //<=== Line (B)
    return;
    }

right under:

    public class HelloVisualJ extends Applet
    {
     
where "HelloVisualJ" is the applet class name.

I was told that the applet should look like:

+--------------------------------------------+
| This string was passed from the HTML host. |
| My First Visual J++ Applet                 |
|                                            |
|                                            |
|                                            |
+--------------------------------------------+

but it showed up in my browser as a blank applet --- both Line (A) and Line (B) were not showing up

Does anyone know what's going on ????????


ASKER CERTIFIED SOLUTION
Avatar of bobbit31
bobbit31
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shapeless
shapeless

ASKER

Shoot !!! That worked !!! :)

Thx a lot.