What method is used to know the status of Checkbox(i.e it
is checked or unchecked)?
Answer / latha
Hi guys, while posting questions in forum make sure that
the question that has been posted by you has clarity or not.
For this question two possible answers are there, they
belogs to
1. AWT controls
2. Java script
Both are having different methods to know the selected
check box value.
Coming to AWT controls, the solution is..
ItemEventobject.getStateChange()==ITEMEVENT.SELECTED
is the syntax to know the selected check box.
Eg::
public void itemStateChanged(ItemEvent ie)
{
double price = out.getPrice();
if (ie.getStateChange() == ItemEvent.SELECTED)
price += 0.50;
else price -= 0.50;
}
In javascript it is so easy to select the checked check box
value by using "checked" property.
Regards
Latha
| Is This Answer Correct ? | 2 Yes | 0 No |
Can we convert stringbuffer to string?
what is mean by synchronization?
3 Answers BOB Technologies, GCPL,
What are the actions that can occur when a thread enters blocked state?
write java code to print second max number in the array
we r taking <load-on-startup>0</load-on-startup> <load-on-startup>1</load-on-startup> in deployment descripter for loading servlets like serv1 N serv2? so 'll it take serv1 or serv2
How do I stop concurrentmodificationexception?
Explain Stream Tokenizer?
What is communist flag?
What is the difference between jsp and servlet?
What are the main concepts of oops in java?
What do you mean by stack?
Can a static method be final?