I have a JPanel with a paintComponent() function. I\'ll call it once, then when the user clicks a different JButton, I\'ll set some fl
JPanel
paintComponent()
JButton
First, why not use an enum instead of a boolean?
enum Enum { RECTANGLE, LINE, CIRCLE } Enum choice = RECTANGLE; //default to RECTANGLE switch(choice) { // case RECTANGLE, LINE, CIRCLE }
With regards to your issue, can you answer my comments in your question?