Solved

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

Posted on 2002-03-19
2
204 Views
Last Modified: 2006-11-17
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 ????????


0
Comment
Question by:shapeless
2 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 50 total points
ID: 6881151
java is case sensitive:

try code=HelloVisualJ.class instead of

code=HelloVisualj.class
 
 
0
 

Author Comment

by:shapeless
ID: 6881268
Shoot !!! That worked !!! :)

Thx a lot.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now