Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am trying to store value of jlabel in array but it is showing error


lblshowans.setText(clld.Answer);
StoredAns[k]=lblshowans;
Posted

You forgot to getText()[^]
lblshowans.getText();
 
Share this answer
 
v2
Comments
Member 11504333 22-Apr-15 7:59am    
peter leow
showing the same problem... Frown | :(
lblshowans.setText(clld.Answer);
StoredAns[count] = lblshowans.getText();
Peter Leow 22-Apr-15 9:01am    
What is 'same problem'? I cannot see your screen. the getText() is correct. What is count? The problem most likely lies with the array, check this out: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
peter leow
showing the same problem... :(

Java
lblshowans.setText(clld.Answer);
        StoredAns[count] = lblshowans.getText();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900