Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JButton changing text  RSS feed

 
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: 53747
127
  • 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
Boost this thread!