Java event handler difficulties

Status
You're currently viewing only Thanatos's posts. Click here to go back to viewing the entire thread.
Not open for further replies.
I would probably just extend JButton and add a public variable. It makes sense for a button that is associated with a cart to have a reference to that card,
I agree. I usually create a different class for each control I create (OKButton, CancelButton, ExitMenuItem, etc.). That way, each control can contain custom properties, and the event handlers can be built into the control class itself.
 
Status
You're currently viewing only Thanatos's posts. Click here to go back to viewing the entire thread.
Not open for further replies.