I'm new to JavaApplets. I read a little tutorial(1) and this weekend, I'm actually trying to practise on a small piece of Code.
This is a ball moving through the 'void'. It is red. If you type 'Wort', it turns green.
What does not work is drawing the char array 'name' or a String 'Hello World'. It just keeps flickering and disapearing.
Please tell me my mistake.
// double buffering and paint are probably the source of the evil
Thank you for your answer. I tried switching to swing, but I didn't manage it (yet).
My mistake was indeed located in paint()
I didn't want to give up my 'game', so I just moved on with awt.
In my IDE Eclipse, the gameflow is smooth. But if I open the applet via Firefox, all I get is a permission denied.
I use the igerman98-wordlist by Björn Jacke under GPL to generate words. This file is saved as words.txt in the world/ package.
I read, that error is caused by false permissions, if you do not sign the code. Therefore I created a signed .jar archive which includes all pictures, class-files and words.txt.
You can reproduce the next error I get here: http://the-agos.net/~User0/game-0.3/game.html It is a nullpointerexception, that appears, because it does not load the words from words.txt into an array.
The array is read at line 295, but is null..
This method reads the words.txt located in world/
I don't think you need my full code, it seems to be more an permissions-problem. If you want to see it anyway, just say so please.
Thanks for your time and advice,
Chris aka editalot