Drawing ovals and rectangles in JApplet with two separate buttons
posted 3 years ago
First off, I'm sorry for the long code I'm just not quite sure what the problem is. I've been messing around with this program for a couple of hours now and I am just stumped. I'm not exactly sure what the draw button is supposed to do specifically, all i know is that it is supposed to draw both rectangles and ovals. The problem I am having is that when ever I click Draw Rectangle, it draws rectangles jusst the way I want but when ever I click Draw Oval, the program keeps drawing rectangles. I've tried repaint and clearRect methods but I did not manage to get them to work. I'm not sure what the problem is right here, I just cannot get it to work. Is there anything you guys can see that might be causing this? It's always good to have a different person look at it then myself. Also, I'm trying to implement a boolean for draw oval but I don't know where to put the if then. Thanks in advance...