• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CandleApplet errors

 
Joniela Geldenhuys
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey

I've just finished coding this project and now they give me errors and I don't know what to do to fix it.
Can somebody please help me??


Errors:
incompatible types
found: java.awt.CheckboxGroup
required: java.awt.Checkbox

Cannot find symbol
symbol: Constructor checkbox(java.lang.string,boolean,java.awt.checkbox)
location: class java.awt.checkbox
 
Maneesh Godbole
Saloon Keeper
Posts: 11064
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In future, while posting code, please UseCodeTags. I have edited your post and added them this time . As you can see it makes the code much more readable and easier to understand.

Errors:
incompatible types
found: java.awt.CheckboxGroup
required: java.awt.Checkbox

Cannot find symbol
symbol: Constructor checkbox(java.lang.string,boolean,java.awt.checkbox)
location: class java.awt.checkbox

Notice anything wrong here?


On a side note, why are you using AWT? You should be using Swing.
Swing offers direct replacement classes for AWT e.g. Applet <=>JApplet CheckBox<=>JCheckBox
 
Joniela Geldenhuys
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks the book said I must use AWT! it is a stupid book and the college I'm at is useless. Ok so I fixed the mistake I made and now they give me 1 more error:

cannot find symbol
symbol: variable shippingGroup
location: class CandleApplet
 
Maneesh Godbole
Saloon Keeper
Posts: 11064
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe it is an old book, when Swing had not yet evolved.

You should pay close attention to the compiler. The compiler is your friend. Not only does it tell you what the problem is, it also tells you the line number where the problem is. I am sure the compiler told you more than just
cannot find symbol
symbol: variable shippingGroup
location: class CandleApplet

I would recommend paying attention to what the compiler tells you.
Hint: Check your spelling
 
Joniela Geldenhuys
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
haha stupid me!! Thanks it is working!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic