Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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: 48454
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