This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Calculator  RSS feed

 
Preston Kruckow
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have ran the program and it works but the buttons wont work on it
here is the code.

[ May 22, 2006: Message edited by: Preston Kruckow ]
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would put some SOPs in the actionPerformed method to trace what is happening.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the buttons 0 to 9 need to have a listener added to them

[edit]
actually
keys[1].addActionListener(this);
the 1 needs to be an i
[ May 22, 2006: Message edited by: Michael Dunn ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!