David Ausman wrote:Well, now I feel dumb. In my own defense that download button looks like it is associated with the item above it. I kept clicking on the "docs" button because that is associated with the correct item.
Thanks very much!
Campbell Ritchie wrote:If it is a private static field in the Card class, how can you access it from the Deck class?
amitabh mehra wrote:
the try-catch I suggested was never meant as an "exit" route. It was for that "dirty" exception stack trace which you would not want the user to see.
For exit purpose, perhaps you can prompt the user to enter something like 'quit' and change your code a bit in the way like:
Now this will still give "Not a number" message to user in case non-number is entered and allow the user to continue. else 'quit' the application.
amitabh mehra wrote:or use a try-catch block:
Maneesh Godbole wrote:Whenever you stretch, resize, move the window, the JVM repaints it. And guess where your to paint the circle sits? In the paint method!
Though the paint is the correct place to have the circle code, if you want a consistent color, irrespective of what you do, just move your color generation code outside paint. Every time the paint is called, your code comes up with a new color.