This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two Classes and a Public Void!

 
Karis Brown
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok for some reason i cant get this to work!
1. I have two panels classes, one for the radio buttons and the other for the checkboxes.
2. the second part is to calculate the choices.
what am i doing wrong, (with out the panels i can get it to work)
here is the code

//An HTML file for this program could be as follows:
//<html>
//<body>
//<applet code = testpanels.class width = 300 height = 200>
//</applet>
//</body>
//</html>
[ February 25, 2004: Message edited by: Dirk Schreckmann ]
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does it do exactly that you define as "not working"? Please provide cocmpiler errors, if any, and describe what results you intend as well as what actually happens.
As an aside, typical Java variable names don't use the underscore character. You may want to read more about Java coding conventions. In particular, class names should start with an uppercase letter and used MixedCaps to seperate words in the name. Other identifiers (functions, variables, etc.) should begin with lower case. If you follow the conventions that other programmers are used to, it sure makes it easier for us to read your code, which also means we will be able to help you find solutions to your problems more quickly.
HTH
Layne
 
Karis Brown
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I will modify! erm, also I get public void abstract itemStateChange (ItemEvent e) { error it asks for class or interface. like i was saying without the panels I can get it working, I also get itemListener problems as well, its all to confusing for me but its part of my degree so it has to be done. C++ is far more simpler!
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will you post the exact error messages you get and indicate which line each one refers to?
And if you think C++ is simpler, you really should try creating a GUI with it. You will soon change your mind.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic