Really all you have to do here is change the return type in the signature of getMaxID to String HOWEVER if you want to comply with javabeans standards, your method signature should really be public int getMaxID() with no arguments, you can rely on your setMaxID(int s) method to set the value. You should just call your toString() method from your GUI - that will return your LottoMaxID represented as a String object the way you have coded it here.
SCJP 6, SCWCD 5
Joined: Jan 05, 2007
good but i get when trying it
i get error int cannot be dereferenced
this so simple stuff but manage to screw anyway, arrgh ..
Joined: Jan 06, 2009
try changing LG.button4.setText(LD.getMaxID().toString()); to LG.button4.setText(LD.toString());