List of usage examples for javax.swing JList isShowing
public boolean isShowing()
From source file:Main.java
static ImageIcon makeImageIcon(URL url, JComboBox combo, int row) { ImageIcon icon = new ImageIcon(url); icon.setImageObserver(new ImageObserver() { public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) { if (combo.isShowing() && (infoflags & (FRAMEBITS | ALLBITS)) != 0) { if (combo.getSelectedIndex() == row) { combo.repaint();/*w w w. ja va 2s.c o m*/ } BasicComboPopup p = (BasicComboPopup) combo.getAccessibleContext().getAccessibleChild(0); JList list = p.getList(); if (list.isShowing()) { list.repaint(list.getCellBounds(row, row)); } } return (infoflags & (ALLBITS | ABORT)) == 0; }; }); return icon; }