This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JButton changing text

 
Harry Mastary
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
I am new to java and especially GUIs.

I have this piece of code and I get a compilation error that my variables (i,j) need to be declared as final.
The thing is that i,j cannot be declared as final as I need them to loop through the array.



Thanks
 
Harry Mastary
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
solution found!
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
Please tell us what the solution was, in case somebody else has a similar problem in future.
 
Harry Mastary
Greenhorn
Posts: 3
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is what I came up with

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic