This week's book giveaway is in the
We're giving away four copies of a choice of
"Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac"
and have Joe Kissell on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
applet not running
Joined: Jul 13, 2004
Jul 13, 2004 21:01:00
I am having problem with my
code. I have the following FirstLine.java file.
int y = new int;
public void getx() throws
LogFile = new FileInputStrea ("Record.log");
in = new
while (in.available() !=0)
y[count] = Integer.parseInt(in.readLine());
public class FirstLine extends Applet
public void paint(Graphics g)
x = new getValue();
g.drawString("File not found", 100, 100);
g.drawString("Mobitel", 100, 100);
for (int i=0; i < 383; i++)
g.drawLine(i, 300-x.y[i], i, 300-x.y[i+1]);
And below is my html code of the file named FirstLine.html
<applet code=FirstLine.class width=400 height=300>
The problem is that I can sucessfully run the applet in appletviewer, but failed to run in web browser. I am using Internet Explorer.
Can anyone help me to correct my code?
Joined: Oct 29, 2001
Jul 14, 2004 06:24:00
How about opening the java console and seeing what the error is? I will bet it is a security exception. Unsigned
can't open files on the client computer.
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
How To Ask Questions On JavaRanch
Joined: Jul 20, 2004
Jul 20, 2004 05:08:00
Try using the below html lines and check out that class file and html files are in the same directory.
<applet code="FirstLine.class" width=400 height=300></applet>
subject: applet not running
Event Handling Question
Applet and IIS
Instance of Graphics ,g , can't be recognized in applen
Giving Pong Computer Intelligence.
How to edit security policy
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014