IIUIC, the Answer button's function is to set some text in a text component. The ActionListener's actionPerformed(..) method is what should do this. If you make the ActionListener an inner class...