aspose file tools
The moose likes Swing / AWT / SWT and the fly likes JButton changing text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JButton changing text" Watch "JButton changing text" New topic
Author

JButton changing text

Harry Mastary
Greenhorn

Joined: Apr 04, 2013
Posts: 3
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

Joined: Apr 04, 2013
Posts: 3
solution found!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43295
    
  32
Welcome to the Ranch
Please tell us what the solution was, in case somebody else has a similar problem in future.
Harry Mastary
Greenhorn

Joined: Apr 04, 2013
Posts: 3
this is what I came up with

 
Don't get me started about those stupid light bulbs.
 
subject: JButton changing text
 
It's not a secret anymore!