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 |
How to calculate the length of a singly linked list in java?
Can you override static method in java?
when we create singleton design then we create private constructtor..so how JVM take private constructor to make object..but it's private..
What is finalize()? Is finalize() similar to a destructor?
What is stop(), suspend(), resume() method?
What is default locale java?
Explain break statement and continue statement?
How can u increase the heap size in the memory?
What is the right data type to represent a price in java?
Explain oops concepts in detail?
What is the use of http-tunneling in rmi?
Can a static method be overridden in java?