Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet suddenly not working.

 
Lise van Oosterhoudt
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helly everyone,
for school we are doing a java applet project.
I am making a clicker thingie. Based on the idear of cookie clicker or something like that.
my code was just fine and all of the sudden it wont initialize anymore.
Can somebody help me?
Thank you
Kind regards,
Lise

 
Tony Docherty
Bartender
Posts: 3054
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Please give all the details: Does the code compile, throw an exception etc. If it just doesn't do what you want it to do then please tell us what it is supposed to do and what it actually does.
 
Lise van Oosterhoudt
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Thank you for answering.
For starters i am using JCreator.
The code doesnt give any errors in the build output or when i try to run it.
The applet screen opens it just gives a blank field with in the bottom right corner : "start: applet not initialized."
With every other problem i got an error with an explanation like ';' expected.
But nothing this time, it runs but its all blank. It has worked before and should show four buttons (a big one in the middle) and a few textfields.
I hope this helps.
Kind regards, Lise
 
Tony Docherty
Bartender
Posts: 3054
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It does throw an exception. You need to look at the Java console to see it.

The problem is you are adding JButton upgrade4 but haven't created a button yet so upgrade4 is null.
 
Lise van Oosterhoudt
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh i see, thank you so much!
 
Tony Docherty
Bartender
Posts: 3054
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've just re-read my last post and it was a bit abrupt - sorry, I was in a hurry when I wrote it.
Have you got your code working now?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic