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??
Jan-29-2004 17:56
UglyDave
i ran a marathon : )
Registered: Jan 2003
Location: Buncrana, Éire
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!
Jan-29-2004 17:57
SuperFarStucker
1380 fp/s
Registered: Jan 2003
Location: Seattle, WA
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
___________________
quote:
Venus: And there are troops of savage giraffes whose necks are on fire, like
the starry ejaculations of fireworks in the very pale sky of childhood
... Venus: Enter, enter here - men of all kinds and races, victims of reality!
You who have the thirst for dreams.
... Venus: You, on life's bitter road, drenched in hard sunlight who have the
thirst that once more the dark marvel of dreams...
Jan-29-2004 18:03
getfoul
LOL Tiesto
Registered: Jan 2004
Location:
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.
Jan-29-2004 18:17
Teknikol
terug uut 'de west'!
Registered: Aug 2002
Location: Flakkee
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!
___________________
blaat en nu stampen
Jan-29-2004 18:17
UglyDave
i ran a marathon : )
Registered: Jan 2003
Location: Buncrana, Éire
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
Jan-29-2004 22:48
DigiNut
You kids get off my lawn!
Registered: Dec 2002
Location: Toronto, Self-proclaimed Centre of the Universe
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?
___________________
My party schedule:
2009-02-21 - DJ Attention @ I'm So Popular
2009-06-18 - DJ Annoying @ People Need To Know Where I'll Be
2012-11-32 - DJ Insufferable ɸ Or At Least the Stalkers I Complain About
2048-06-66 - Spastic & Whocares ¶ Although I'm Actually Flattered
9999-45-81 - Tweaker Gimp ☼ I Probably Won't Even Go To This But I Have To Make Sure I Fill Up All The Available Space Here
Jan-29-2004 22:52
UglyDave
i ran a marathon : )
Registered: Jan 2003
Location: Buncrana, Éire
only msg i get is:
"applet ticket notinited"
which is in the status bar of the browser.
thank goodness! DigiNut is on the case!
Jan-29-2004 23:07
DigiNut
You kids get off my lawn!
Registered: Dec 2002
Location: Toronto, Self-proclaimed Centre of the Universe
Oh, I see it.
You called the applet "ticker" and tried to embed class "ticket" into the HTML.
Doofus.
___________________
My party schedule:
2009-02-21 - DJ Attention @ I'm So Popular
2009-06-18 - DJ Annoying @ People Need To Know Where I'll Be
2012-11-32 - DJ Insufferable ɸ Or At Least the Stalkers I Complain About
2048-06-66 - Spastic & Whocares ¶ Although I'm Actually Flattered
9999-45-81 - Tweaker Gimp ☼ I Probably Won't Even Go To This But I Have To Make Sure I Fill Up All The Available Space Here
Jan-29-2004 23:10
UglyDave
i ran a marathon : )
Registered: Jan 2003
Location: Buncrana, Éire
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
Jan-29-2004 23:15
DigiNut
You kids get off my lawn!
Registered: Dec 2002
Location: Toronto, Self-proclaimed Centre of the Universe
Sure you are Dave, suuuuuure you are.
Well as long as it's fixed. Should say code="tickeR.class".
___________________
My party schedule:
2009-02-21 - DJ Attention @ I'm So Popular
2009-06-18 - DJ Annoying @ People Need To Know Where I'll Be
2012-11-32 - DJ Insufferable ɸ Or At Least the Stalkers I Complain About
2048-06-66 - Spastic & Whocares ¶ Although I'm Actually Flattered
9999-45-81 - Tweaker Gimp ☼ I Probably Won't Even Go To This But I Have To Make Sure I Fill Up All The Available Space Here
Jan-29-2004 23:19
UglyDave
i ran a marathon : )
Registered: Jan 2003
Location: Buncrana, Éire
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..