Here is the class which I am struggling with: SubChoicesPanel
There are other classes used which I'll put at the end. The class generates a CardLayout of JPanels. There are plus & minus buttons, as these are pressed the JLabel increments & decrements accordlingly. So far so good. The problem is that this panel then redraws another panel TillPanel and updates the tally accordingly. i.e. if the user selects bitter the JLabel incements 1 and the tally in BillPanel increases, the output isn't quite right. I think that my next step would be to make the arrays plus, minus etc into multiple arrays, this would help accesing them. I am aware that this is a long piece of code & understand people not wanting to get involved in it. It might be easier to just run it to see what I mean. Here are the other classes: BillTill
Any constructive advice would be gratefully received. Thanks, Dave.
I'm trying to run this program to see the output. I put all the .java files into a directory ( say c:\myWork\javaRanch ) and tried to compile them. I started with the TillPanel, as that has no dependancies. Then I tried SubChoicesPanel, but it wouldn't compile. It can't find the TillPanel class. What am I doing wrong? Anyone? Oh. I am using JBuilder as my IDE...I added these 4 .java files to a blank project. Why can't classes see eachother?
-nothing important to say, but learnin' plenty-
posted 15 years ago
I'm not sure why you can't get running. I wrote them in this order: 1. BarTill, 2. ChoicePanel, 3. SubChoicesPanel 4. TillPanel. But as Bartill has the main method(), that will have to be run. Hope that helps, Dave.
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
create, convert, edit or print DOC and DOCX in Java