• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

First Applet

 
Mark Lopez
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I can�t run my first applet in the Applet Viewer. Maybe is the antivirus, firewall or the book I� am using. I know I need to take time to do more research beyond the book or read in the JavaRanch. Excuse me if is a repetitive or silly question as expected. But really my eyes flare for now.

I�m using TextPad editor. Also I try to run the applet with the instruction given, by that book, in command prompt. I typed appletviewer WelcomeApplet.html, after compilation and saved in the same folder as the sources, html, image file, java, and doesn�t run.

Here is the java code:



And the html given by the book:



I appreciate any help, thanks.
[ November 28, 2005: Message edited by: Mark Lopez ]
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "it doesn't run" mean?
What happens if you load the page in a web browser? Are there any messages in the Java console?
What happens if you load the page into appletviewer?
 
Mark Lopez
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q- What does "it doesn't run" mean?

A- I mean that the output performs as intended. But the appletviewer
does nothing.

Q- What happens if you load the page in a web browser? Are there any
messages in the Java console?

A- When I load the page in the browser Internet Explorer restrict the
file from showing the active content. Then I click option and allow
the content. After few seconds the applet appears but incrusted or
painted in the page. Not as independent window like the
appletviewer.

The output painted as part of a page I the message intended. The
Smiley.gif file at the left and the Welcome to may day, Daily planer
for�, the current date and time all in a cyan background color is
ok.

In the command prompt window does not appear to be any
runtime error after compilation. Simply, the applet doesn�t appear
and command prompt issue another prompt.

Q- What happens if you load the page into appletviewer?

A- This is for what I�m here. How I do that?
 
Mark Lopez
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the Command Prompt I type the full path of the directory where reside the appletviewer. Something like:
CD\Java Programs\jdk1.5.0_02\bin\appletviewer.exe

After enter the path, this message happened in Command Prompt:



Then I type:
C:\Java Programs>WelcomeApplet.html

And the program opens the browser with the same thing, I tell you before, that look like an applet. But not open a separate, of the host page, window. Neither the appletviewer.
 
Mark Lopez
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for take of your time. Was something related with the directory were I put things. Now the applet works in their Applet Viewer window. Looks really great. Also with their single Applet menu for less distraction.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic