QuoteListener

QuoteListener - if (source == comedy) quote.setText...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// QuoteListener represents the listener for // all radio buttons private class QuoteListener implements ActionListener { // Sets the text of the label depending on which // radio button was pressed. public void actionPerformed (ActionEvent event) { Object source = event.getSource();
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if (source == comedy) quote.setText (comedyQuote); else if (source == philosophy) quote.setText (philosophyQuote); else quote.setText (carpentryQuote); } } // end of QuoteListener class } // end of QuoteGUI class...
View Full Document

Ask a homework question - tutors are online