java - Enabling a jbutton at startup -
i have login form , mainform. in mainform have disabled jbutton. want enable jbutton if username login form "admin". have singleton controller instantiated in both forms.
if(controller.admin=="admin"){jbutton.setenabled(true)}; but i’m new swing , don't know use code. tried using in mainform's constructor didn't work.
if((controller.admin).equals("admin")) { jbutton.setenabled(true); } this correct code .please describe questions code
Comments
Post a Comment