Hi all, please review the fix http://cr.openjdk.java.net/~bagiras/7160604.1/ for https://bugs.openjdk.java.net/browse/JDK-7160604
For now popup menu is painted correctly, so the fix applies to drop-down list of combo-box only. BasicComboPopup class implements drop-down list. BasicComboPopup.isVisible() checks whether BasicComboPopup.popup field is not null. When the drop-down list is about to show and the following call-chain occurs: BasicComboPopup.togglePopup() -> show() -> setVisible(true) -> getPopup() newPopup.show() method is called before BasicComboPopup.popup field is updated. Thus when painting occurs for the first time (synchronously, inside newPopup.show()), BasicComboPopup.isVisible() returns false and JComponent.paintChildren() skips drawing of BasicComboPopup. So the fix makes BasicComboPopup.popup field being updated before call of Popup.show(). Moreover setting of BasicComboPopup.popup field was moved inside BasicComboPopup.getPopup() method as the same thing happened after each call of this method.
Thanks, Oleg