my dog learned polymorphism*
The moose likes Beginning Java and the fly likes Two Classes and a Public Void! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Two Classes and a Public Void!" Watch "Two Classes and a Public Void!" New topic

Two Classes and a Public Void!

Karis Brown
Ranch Hand

Joined: Nov 13, 2003
Posts: 33
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:
//<applet code = testpanels.class width = 300 height = 200>
[ February 25, 2004: Message edited by: Dirk Schreckmann ]

So Cold & So Outa Control
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
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.

Java API Documentation
The Java Tutorial
Karis Brown
Ranch Hand

Joined: Nov 13, 2003
Posts: 33
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

Joined: Dec 06, 2001
Posts: 3061
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.
I agree. Here's the link:
subject: Two Classes and a Public Void!
Similar Threads
help, itsnot working no more since putting in swing!
if its not one thing its another!!
HELLP! i cant get 2 JPanels to display without them sitting on the other!
trying to get a value from another class
why do the two errors come out?