By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,246 Members | 1,451 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,246 IT Pros & Developers. It's quick & easy.

refresh of picture by java applet

P: n/a
Don
Hi,

I try to get a simple applet working, the class-file does load, but the
image doesn't appear;( An error doesn't appear. The view is and stays
'grey'

What I want: Automatic refresh of a webcam image

Filename is the same. File is located in same directory as applet.

I did get an advise to visit
http://developers.webcamworld.com/template3_cd.html but it still doesn't
work;(

Hope there's someone who can and wants to help me.

Don
-mandrake 10 & Apache

<html>
****<head>
*********<title>Untitled*Document</title>
****************<meta*http-equiv="Content-Type"*content="text/html;
charset=iso-8859-1">
****</head>
****<body*bgcolor="#FFFFFF"*text="#000000">

*****************<p>
*****************<APPLET*code="JavaCam.class"*code base="/location/java/"****
*****************width="320"*height="240">
*****************<PARAM*name="url"*value="/location/java/camera.jpg">
*****************<PARAM***name="interval"*value="2 0"></APPLET>
*****************</p>

****</body>
*</html>
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
This would depend on the container of the image. I found trying to do
raw painting of pictures to be cumbersome - although there is a good
reason for this. Java loads images as separate THREADS, so you need an
ImageObserver implementation to monitor the progress of the loading.

However, if you are using a JLabel to hold the image, this is all done
for you from within the JLabel class itself. I personally found this a
much easier method for the casual loading of images.



Don wrote:
Hi,

I try to get a simple applet working, the class-file does load, but the
image doesn't appear;( An error doesn't appear. The view is and stays
'grey'

What I want: Automatic refresh of a webcam image

Filename is the same. File is located in same directory as applet.

I did get an advise to visit
http://developers.webcamworld.com/template3_cd.html but it still doesn't
work;(

Hope there's someone who can and wants to help me.

Don
-mandrake 10 & Apache

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">

<p>
<APPLET code="JavaCam.class" codebase="/location/java/"
width="320" height="240">
<PARAM name="url" value="/location/java/camera.jpg">
<PARAM name="interval" value="20"></APPLET>
</p>

</body>
</html>

Jul 17 '05 #2

P: n/a
Don
Hi,

Thanx for your reply.

Since I'm a newbie with Java, I don't understand what you try to tell me.
Can you give me a little bit more clear explanation? I mean, I'm looking
for a simple, safe way to manage autorefresh of a webcam picture...

AnonymousOne wrote:
This would depend on the container of the image. I found trying to do
raw painting of pictures to be cumbersome - although there is a good
reason for this. Java loads images as separate THREADS, so you need an
ImageObserver implementation to monitor the progress of the loading.

However, if you are using a JLabel to hold the image, this is all done
for you from within the JLabel class itself. I personally found this a
much easier method for the casual loading of images.


Jul 17 '05 #3

P: n/a
Don wrote:
Since I'm a newbie with Java, I don't understand what you try to tell me.
Can you give me a little bit more clear explanation? I mean, I'm looking
for a simple, safe way to manage autorefresh of a webcam picture...


Which program did you use to write the applet?

If it is an IDE (a program for writing software), you can run the applet
from de IDE and see any errors.

You can get a free Java IDE here: http://www.eclipse.org/

But you should be able to get errors from the browser. In Internet
Explorer, you can turn on a option somewhere in the Extra menu. Look for
Java in the Advanced-tab.

Or try Mozilla (not Firefox). Mozilla has default a Java console (if I
remember correctly).

Eventually, you should have an error message which will tell you more
(valuable) information.

Oh, IDE's also have a debug mode, in which you can walk through your
program and see where things go wrong.

Edwin Martin

--
http://www.bitstorm.org/
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.