Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Clarence Kirby

Greenhorn
+ Follow
since Jun 18, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Clarence Kirby

Originally posted by Corey McGlone:

That's true, but that might also be why most hockey players go to great length not to block pucks with their faces.
As difficult as it may be to believe, there is a strategy for how you block a puck.


That's beside the point. Whether your trying to block the puck or not, there is a much better chance of getting crippled from playing hockey than from soccer.
18 years ago
BTW, in the applet tag you should have a name paramater:
<applet code="myApplet.class" name="myApplet" width="1" height="1">
</applet>
That might be what's ailing your applet.
18 years ago
Well I looked up what you did in Javascript book and it looks like it should work. Maybe you should try using a Component method to resize the applet instead of setting a javascript applet property. Try this?:
document.appletName.setSize(width, height) ;
The javascript book that I'm reading says that either way should work.
18 years ago
thanks a bunch all!
18 years ago
Why do you have a MainKeyHandler class inside of your Example class? Wouldn't it just be easier to implement KeyListener in the ExampleClass?
Also, what Matt said above I agree with. It's at least more readable and understandable if you use class constants from the class itself, not an instance of the class.
18 years ago
Do you realize that there is no queue class in Java? All there is, is a stack class which can be easily emulated by using a regular array. I was a little urked when I had to go and create my own queue class just to use for a simple java applet.
Just wondering though, since I only use java 1.1 (where I work requires it) I don't know if there in fact is a Queue class for later versions of Java. Anyone know?
18 years ago
I am having the exact same problem. If you figure anything out (besides just using 2 buttons) please let me know.
18 years ago
ok, so what if it's not a static variable? Would I still not be able to initialize it in the constructor?
18 years ago
PSS:
- Ashok

I think you mean PPS:
Bwahaha. :]
18 years ago
Well I guess I could follow your suggestions, but since this is for a professional company, and I'm working for a professional organization I don't think they would appreciate the explosions as much as you and I would. Bwaahah.
Also, this is supposed to be a ptolemic model of the sun's orbit so there.
For the most fun:
- check all of the checkboxes
- set the speed of the big orbit to -120
- set the speed of the small orbit to 180
btw, you can click and drag the mouse on the canvas to rotate the view.
18 years ago
but if no instance is created that variable never exists. The class must be instantiated since its not abstract. Right?
18 years ago
Well, this is what I mean:
public class blah {
final static int whatever ;
...
public blah(){
whatever = 5 ;
}
...
}
is that valid
18 years ago
what if I declare a global final for some class and when the constructor (the only constructor) gets called I initialize the final then?
18 years ago
is there a way to declare a final, or a final static and then assign the value to it later in the program?
18 years ago
Here's a great paradox that relates with this topic:
One seemingly ordinary overcasted day a group of people went on a picnic together. Then, from out of the blue an alien ship came down and landed right next to the park where these people were eating. An alien came out of the spaceship and came over to the group of people. He announced to them that he had perfect foresight and he could predict anyone's personal decision with 100% accuracy. Of course everyone doubted him.
So he said he would prove it to them, "I have with me two boxes, under one will always be $1000, but under the other will be either $0 or $1000000. You have a choice, you can either pick both boxes in which case there will be no money under the second box and you will earn only $1000, or you can pick the second box in which case there will be the $1000000 under it. Sense I have perfect foresight I will know what choice you will make beforehand and will either put the money under the second box or won't (hidden from view of course). Then you may go up to the boxes, make your choice, and the appropriate money will be waiting for you."
The first person to go up thought to herself, "Sense the alien has already put the money under the boxes, no matter what choice I make the money is there and its not going anywhere. So if I choose to take what's inside both boxes I will at least end up $1000 richer."
After many people made this same choice (and they all got merely $1000) a man decided to try the other option. "I've seen all of these people go and get the money the alien promised they would get for their choice. I trust this alien does have perfect foresight and so I will choose to take only the money under the second."
The man made his decision and sure enough he got his $1000000.
I'm not making any claims to whether or not this supports/opposes the claim of free will, I just thought it might be something additional to think about during this discussion.
18 years ago