TranceAddict Forums

TranceAddict Forums (www.tranceaddict.com/forums)
- Chill Out Room
-- what's wrong with my Applet?


Posted by UglyDave on Jan-29-2004 17:56:

what's wrong with my Applet?

code:
import javax.swing.JApplet; import javax.swing.JOptionPane; import java.awt.Graphics; public class ticker extends JApplet{ private String tickText; public void init(){ tickText = JOptionPane.showInputDialog(null,"Enter text:"); } public void paint(Graphics g){ super.paint(g); g.drawString(tickText,25,25); } }


html:

code:



wont work for some reason, but when i run it from blueJ it's fine.

anyone got any suggestions??


Posted by UglyDave on Jan-29-2004 17:57:

by the way.. i'm way leeter than what might appear.. it's just that i'm new to applets

just incase u were thinkin i was a lamo!


Posted by SuperFarStucker on Jan-29-2004 18:03:

quote:
Originally posted by UglyDave
by the way.. i'm way leeter than what might appear.. it's just that i'm new to applets

just incase u were thinkin i was a lamo!


lol


Posted by getfoul on Jan-29-2004 18:17:

quote:
Originally posted by UglyDave
by the way.. i'm way leeter than what might appear.. it's just that i'm new to applets

just incase u were thinkin i was a lamo!
that was actually my first thought.


Posted by Teknikol on Jan-29-2004 18:17:

quote:
Originally posted by UglyDave
by the way.. i'm way leeter than what might appear.. it's just that i'm new to applets

just incase u were thinkin i was a lamo!




Posted by UglyDave on Jan-29-2004 22:48:

lots of useful feedback here

where's DigiNut??

he usually knows his shit

i guess it's a big non-leet of me to be askin in the first place, but ah well

i plan on makin loads of wee web apps and givin them away for free..

so far i've made a guestbook, user tracking devices.. and now i'm gonna start applets


Posted by DigiNut on Jan-29-2004 22:52:

My Swing is a little bit rusty, but does that init method ever actually get executed? If not, then you're trying to draw a string that hasn't been initialized.

What exactly is the error?


Posted by UglyDave on Jan-29-2004 23:07:

only msg i get is:

"applet ticket notinited"

which is in the status bar of the browser.

thank goodness! DigiNut is on the case!


Posted by DigiNut on Jan-29-2004 23:10:

Oh, I see it.

You called the applet "ticker" and tried to embed class "ticket" into the HTML.

Doofus.


Posted by UglyDave on Jan-29-2004 23:15:

quote:
Originally posted by DigiNut
Oh, I see it.

You called the applet "ticker" and tried to embed class "ticket" into the HTML.

Doofus.


oookkk

explain that

*feels stupid*

i swear to God i'm leet!!!

honnestly i am

i'd kick ur ass in a java theory test
or programmin chellenge


Posted by DigiNut on Jan-29-2004 23:19:

Sure you are Dave, suuuuuure you are.

Well as long as it's fixed. Should say code="tickeR.class".


Posted by UglyDave on Jan-29-2004 23:23:

quote:
Originally posted by DigiNut
Should say code="tickeR


cheers Digi!

had it not been for that huge R i never would have found it

now that ur there, are there any timer functions in java? i'm sure there are, know of any?

in VB there was a thing u could use.. set a timer, then every 100 (or whatever u set it to) milliseconds a piece of code would be executed..

ne suggestions?


Posted by UglyDave on Jan-29-2004 23:26:

damn this is slow.

why the hell is java so slow anyways?


Posted by DigiNut on Jan-29-2004 23:27:

javax.swing.Timer?

Java is slow because it's a burning smelly mountain of diseased pubic hair.


Posted by UglyDave on Jan-29-2004 23:35:

quote:
Originally posted by DigiNut
javax.swing.Timer?

Java is slow because it's a burning smelly mountain of diseased pubic hair.


lovely!

lookin through the API now!

thankin you!



Powered by: vBulletin
Copyright © 2000-2021, Jelsoft Enterprises Ltd.