I get base source code in this.
I change it as bellow
My problem is
1. i want at program start only one checkbox should enable...rest all disable
2. when 1st checkbox get 'checked'... same time 2nd checkbox should enable...rest all disable...
3. when 2nd checkbox get check...3rd will enable....but 1st will disable...
4 but now instead of checking 3rd if i remove 'checked' from 2nd...then 1st will enable...
So any time i got checkbox number n for check or uncheck...same time n-1 & n+1 both checkbox get enable...but n-2 & n+2 & rest all get disable...
I tried but stuck in code...need clue...I trying till some one reply...if i got way before reply then i will post here...
Millions saw the apple fall, but Newton asked why.
If you understand, say "understand". If you don't understand, say "don't understand". But if you understand and say "don't understand". How do I understand that you understand? Understand!
Mandar Khire wrote: . . .
I tried but stuck in code...need clue...I trying till some one reply...if i got way before reply then i will post here...
That is part of the problem. You have tried writing code before you worked out what you want to write.
Start from scratch. Draw a diagram of your array of check boxes, and how you intend to activate them. If you have an array, you can probably use the array index to activate the next box.
But that will give you a very strange design of you GUI.
the disable/enable bit sounds very similar to using a ButtonGroup,
where only one can be selected at a time (except they're all still 'enabled').
as for the 'unchecking' of a checkBox, probably one of the listeners where
you can test for 'unselected', and if so, set the appropriate checkbox to selected true.