I am doing a "lazy" init on my drop down combo, using the recently
added event listener
addPopupMenuListener(new javax.swing.event.PopupMenuListener(){
public void popupMenuWillBecomeVisible(PopupMenuEvent e)
{
}
}
However, I find that the first time I drop down the combo, the size of
the dropdown (the white rectangle background) is incorrect, it uses
the size of the combo the previous time it was dropped down. To be
more precise, if on the previous dropdown event, there were 3 items in
the combo, and this time there is only 1, it will dropdown with a
white background with enough space for 3 lines. Any idea why and how
to fix it?
Some other factors that may be involved are:
- I have found for reasons beyond my understanding that the only way
to get it work reliably was to create TWO combobox models behind the
scenes, and alternate between them (I'm sure this is the reason, but I
can't figure out a way to get the number of lines to dropdown)
- this combo is an in-cell editor in a JTable
thanks for any help
Chris
|
|
0
|
|
|
|
Reply
|
quantumf
|
9/12/2003 8:29:00 AM |
|