40 |
|
|
41 |
import java.awt.Component; |
import java.awt.Component; |
42 |
import java.awt.Dimension; |
import java.awt.Dimension; |
43 |
|
import java.awt.Insets; |
44 |
import java.awt.Point; |
import java.awt.Point; |
45 |
import java.awt.Rectangle; |
import java.awt.Rectangle; |
46 |
import java.awt.event.ItemEvent; |
import java.awt.event.ItemEvent; |
180 |
int popupHeight = getPopupHeightForRowCount(comboBox.getMaximumRowCount()); |
int popupHeight = getPopupHeightForRowCount(comboBox.getMaximumRowCount()); |
181 |
|
|
182 |
list.setPreferredSize(new Dimension(cbBounds.width, popupHeight)); |
list.setPreferredSize(new Dimension(cbBounds.width, popupHeight)); |
183 |
super.setPopupSize(cbBounds.width, popupHeight); |
Insets insets1 = getInsets(); |
184 |
|
Insets insets2 = scroller.getInsets(); |
185 |
|
super.setPopupSize(cbBounds.width, popupHeight + insets1.top |
186 |
|
+ insets1.bottom + insets2.top + insets2.bottom); |
187 |
|
|
188 |
// Highlight selected item in the combo box's drop down list |
// Highlight selected item in the combo box's drop down list |
189 |
if (comboBox.getSelectedIndex() != -1) |
if (comboBox.getSelectedIndex() != -1) |