Results 1 to 2 of 2
- 08-01-2007, 05:27 AM #1
Member
- Join Date
- Jul 2007
- Posts
- 40
- Rep Power
- 0
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.Java Code:panel1.add(addButton); 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:Java Code:addButton.addActionListener(this);
ThanksJava Code:addActionListener(java.awt.event.ActionListener) in javax.swing.AbstractButton cannot be applied to (tester) tester is the name of my class.
- 08-01-2007, 06:10 AM #2
Similar Threads
-
javax.comm:Error instantiating class com.sun.comm.Win32Driver
By bbq in forum Advanced JavaReplies: 7Last Post: 07-12-2010, 04:24 PM -
javax.microedition.io/ javax.bluetooth
By ahtiven in forum New To JavaReplies: 3Last Post: 01-13-2009, 02:54 PM -
Error: javax.servlet.ServletException: Column not found
By barney in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 08-07-2007, 07:20 AM -
Error: cannot be applied to (java.lang.String)
By carl in forum New To JavaReplies: 1Last Post: 08-05-2007, 06:33 AM -
map javax.swing.text.Element to javax.swing.text.View
By elizabeth in forum New To JavaReplies: 1Last Post: 07-30-2007, 07:02 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks