After looking more closely at your code, it doesn't seem as nearly as simple as I thought when I first read your question. One of the problems is that I didn't notice that you already have a display() method in the Account class, but the paint() method is in Lab7 class. When you have two methods in different classes, it helps to use the class name along with the method to avoid confusion. So here we should talk about Account.display() and Lab7.paint() to clarify that the two methods are in different classes. This is the essential part I was missing with my previous comments. I thought that these two methods were in the same class
So to figure this out, let's back up for a minute? What exactly should Account.display() do? It seems likely, that it should display the information about a single Account. I would suggest that you figure out how to do this. Notice that the Account class doesn't need the variables check and save because, as you are using them in the Lab7 class, they represent the balances for two different accounts. But the Account class only represents a SINGLE account and it already has its own variable to keep track of that account's balance. In fact, you don't really need the check and save variables in Lab7 because those values are indirectly available through the saving and checking variables that represent each account.
So to reiterate,
you should try to fill in Account.display() so that it prints the information for the "current account". Once you get that much, you can work on calling this method from Lab7.paint().
I hope this helps. Let us know what problems you encounter from there.
Keep Coding!
Layne
p.s. I'd also like to mention that saying "the variables check and save are local variables to the class Lab7" may be a little confusing to most
Java programmers. I think I understand what you mean, but you are not using the term "local variables" correctly. To clarify, a local variable is one that is declared inside a method. Since check and save are declared in the class and outside any method, they are NOT local variables; they are "member variables".
[ April 03, 2005: Message edited by: Layne Lund ]