Solved

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

Posted on 2002-03-19
2
212 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

937 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

4 Experts available now in Live!

Get 1:1 Help Now