The right answer is: B) 1 Button with label "Ok" and 4 Buttons with label "Cancel" . You are instantiating 1 button with the label 'Ok' and you add it to the Applet (default Layout Manager: FlowLayout) 4 times that doesn�t mean that you have 4 buttons. Is it clear?
Hi, The answer IMHO is 1 okButton,4 Cancel buttons. Although u r adding okbutton 4 times,it's actually only one button added over the other. You have to have new button object every time you add. Hope this helps. Sarang