Error: javax.swing.AbstractButton cannot be applied to...
Hi, iv written a program which has a JtabbedPane GUI but the problem is on one of my tabs i have a JPanel called panel1. on panel1 i have a button called addButton now i add this button onto my panel and my panel onto the tab using the following code:
which works just fine and when compiled you see the tabs and the button on the first pane.
tabbedPane.addTab("New Booking", null, panel1, "First Panel");
but then when i try and ad an actionlistener to the button using the following code
i get this error:
addActionListener(java.awt.event.ActionListener) in javax.swing.AbstractButton cannot be applied to (tester)
tester is the name of my class.