Okay, cart before the horse = cart doesn't go well (or goes backwards).
You might change your actionPerformed() method like this:
// create a new dog instance with the contents of the text...
Type: Posts; User: GregBrannon
Okay, cart before the horse = cart doesn't go well (or goes backwards).
You might change your actionPerformed() method like this:
// create a new dog instance with the contents of the text...
If dog is an instance of Dog and textArea the JTextArea in which you want to invoke the Dog.toString() method, then a way to do that is:
textArea.setText( "" + dog );
@phunnydoode: Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.
@destitute.developer: Please follow Java naming conventions and...