| Author |
Checkbox items incombobox rendering
|
charanjeeta singh
Greenhorn
Joined: Dec 12, 2010
Posts: 2
|
|
Hi All,
I am trying to show checkboxes in combobox i.e. each element in the combobox will be a checkbox so that user can
select multiple options in the combobox. This will be same as "AutoFilter Option in MS Excel 2007". After much
googling around, I have the following solution with only one issue pending:
When you run the above code, you will see a combo box with three elements, "Item-A", "Item-B" and "Item-C". All the
three elements are checkboxes so that user can select multiple options. However, if you will select the option which
is already selected in the combobox, its checkbox will not be rendered correctly, even though the state of the
checkbox has changed correctly.
Ex: On running the sample application, if you open the combobox and select the "Item-A", its checkbox will not be
rendered correctly. If you move the mouse over other item (with pop up already opened), you will see the state of
the "Item-A" checkbox has indeed changed but it is not showing correctly. The same thing happens whenever you select
a already selected item in the combobox. It seems there is some rendering issue.
Please help.
Thanks,
Charanjeet
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4167
|
|
Charanjeet, welcome to the Ranch! Please BeForthrightWhenCrossPostingToOtherSites.
http://www.java-forums.org/awt-swing/36086-checkbox-items-combox-rendering.html
edit http://forums.oracle.com/forums/thread.jspa?threadID=2143880
|
luck, db
There are no new questions, but there may be new answers.
|
 |
charanjeeta singh
Greenhorn
Joined: Dec 12, 2010
Posts: 2
|
|
Quite obviously, the person looking for an answer to his/her query will post his query to different forums. And will obvoiusly choose the best answer that he will get from different forums. I dont understand the fuss about it.
Different folks follow different forums so to get the best answer, person will definitely post to different forums.
I have posted this to
Oracle (http://forums.oracle.com/forums/thread.jspa?messageID=9212576&)
Java Forums: http://www.java-forums.org/awt-swing/36086-checkbox-items-combox-rendering.html
Coderanch: http://www.coderanch.com/t/520234/GUI/java/Checkbox-items-incombobox-rendering
Codeguru: http://www.codeguru.com/forum/showthread.php?t=506434
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
charanjeeta singh wrote:Quite obviously, the person looking for an answer to his/her query will post his query to different forums. And will obvoiusly choose the best answer that he will get from different forums. I dont understand the fuss about it.
Different folks follow different forums so to get the best answer, person will definitely post to different forums.
We don't mind cross posting, as long as you tell us (and the other forum users). We might go spending quite a bit of time trying to find a solution, only to then find out that solution was already given on a different forum. It will make us feel like we wasted our time.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4167
|
|
charanjeeta singh wrote:Quite obviously, the person looking for an answer to his/her query will post his query to different forums.
Nothing obvious about it.
|
 |
 |
|
|
subject: Checkbox items incombobox rendering
|
|
|