Connecting Tech Pros Worldwide Help | Site Map

Applet Question

Familiar Sight
 
Join Date: Mar 2008
Posts: 174
#1: Jun 16 '08
Why is it whenever you scroll up and down on a web page an Applet flashes.
BigDaddyLH's Avatar
Moderator
 
Join Date: Dec 2007
Location: Kelowna, BC Canada
Posts: 1,212
#2: Jun 16 '08

re: Applet Question


This applet does flash for me:

http://www.time.gov/timezone.cgi?Pacific/d/-8/java
Needs Regular Fix
 
Join Date: Nov 2007
Location: Cebu City, Philippines
Posts: 508
#3: Jun 16 '08

re: Applet Question


May i know what's the content of your paint( Graphics graphics ) method?
Familiar Sight
 
Join Date: Mar 2008
Posts: 174
#4: Jun 16 '08

re: Applet Question


Quote:

Originally Posted by sukatoa

May i know what's the content of your paint( Graphics graphics ) method?

Usually just things like g.drawString("asdfsdg", 123, 123); and things like that.
BigDaddyLH's Avatar
Moderator
 
Join Date: Dec 2007
Location: Kelowna, BC Canada
Posts: 1,212
#5: Jun 16 '08

re: Applet Question


A properly written JApplet shouldn't flash. Post a SSCCE: http://mindprod.com/jgloss/sscce.html

By the way, unless you have a specific requirement for sticking it on a web page, I suggest writing a stand-alone app with a JFrame instead. It's easier to debug and test (no browser getting in the way) and you can always turn it into a JApplet later.
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#6: Jun 16 '08

re: Applet Question


Quote:

Originally Posted by BigDaddyLH

A properly written JApplet shouldn't flash.

The OP was talking about Applets, not JApplets; he probably should use the
latter; if at all.

kind regards,

Jos
BigDaddyLH's Avatar
Moderator
 
Join Date: Dec 2007
Location: Kelowna, BC Canada
Posts: 1,212
#7: Jun 16 '08

re: Applet Question


Quote:

Originally Posted by JosAH

The OP was talking about Applets, not JApplets; he probably should use the
latter; if at all.

kind regards,

Jos

Oh, that's true. I didn't assume "applet" meant "class Applet, not JApplet". They should hide the old AWT tutorial better ;-)
Reply


Similar Java bytes