Solved

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

Posted on 2002-03-19
2
241 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

626 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