0

How to increment in for loop only when jbutton is pressed?

I am retrieving the objects from arraylist....after retrieving first object..the second object must be retrieved only if button pressed else it should not go further https://code.sololearn.com/cY1cnUCnM486/?ref=app

20th Mar 2020, 3:32 PM
Punnam Ruthvik Reddy
6 Réponses
+ 1
OK, you have jbutton and arraylist Create smth like eventlistener Create smth like int counter When eventlistener will be called => ++counter and retrieve your elements
20th Mar 2020, 8:55 PM
Marina Vasilyova
Marina Vasilyova - avatar
+ 1
OK, I can help
21st Mar 2020, 4:49 PM
Marina Vasilyova
Marina Vasilyova - avatar
+ 1
Please, provide full code
21st Mar 2020, 4:50 PM
Marina Vasilyova
Marina Vasilyova - avatar
+ 1
Where is the Admin class for example?
21st Mar 2020, 5:35 PM
Marina Vasilyova
Marina Vasilyova - avatar
0
Maria Vasilyova I did like that already.....it shows a error like something......variables in enclosing........should be declared final.....
21st Mar 2020, 1:57 AM
Punnam Ruthvik Reddy
0
I did....that was the full code
21st Mar 2020, 5:24 PM
Punnam Ruthvik Reddy