• Post Reply Bookmark Topic Watch Topic
  • New Topic

b1.addActionListener( this);

 
Chitlesh GOORAH
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai there,
im having this problem during compilation
ExempleBoutons.java:21: addActionListener(java.awt.event.ActionListener) in javax.swing.AbstractButton cannot be applied to (ExempleBoutons)
b1.addActionListener( this);
^
1 error

Whats wrong here?



[ May 23, 2005: Message edited by: Chitlesh GOORAH ]
[ May 23, 2005: Message edited by: Gregg Bolinger ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's interesting. I don't get that error message when I compile your code. What version of Java are you using?
 
Chitlesh GOORAH
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im using Java 1.5.0 on Fedora Core 3 (linux)

when you click on the first button what does happens?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chitlesh GOORAH:
im using Java 1.5.0 on Fedora Core 3 (linux)

when you click on the first button what does happens?


I didn't run it. You said:


im having this problem during compilation


You code compiles fine. Is this happening when you run the application?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I click the button1 I get

button appuy0

printed on the console.
 
Chitlesh GOORAH
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you have any idea why i cant compile it?

im using this version since 2 months now, !!!
 
Chitlesh GOORAH
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you compile this for me please?
im having this odd problem again i thkhttp://www.coderanch.com/t/340807/GUI/java/Timer-wrong-constructor
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!