by jimjam » Mon Jun 15, 2009 8:50 am
Thanks, but I'm afraid that doesn't appear to help. My problem is with an editable combo and a JIDE Overlayable.
Something like:
JComboBox combo = new JComboBox(items);
combo.setEditable(true);
JLabel attentionIcon = new JLabel OverlayableUtils.getPredefinedOverlayIcon(OverlayableIconsFactory.ATTENTION));
overlayableComboBox = new DefaultOverlayable(combo, attentionIcon, DefaultOverlayable.SOUTH_WEST);
overlayableComboBox.setOverlayLocationInsets(new Insets(3, 5, 3, 0));
The overlay looks just fine until the caret goes near and starts to erase it. For most controls, the documented solution is to override repaint() and call OverlayableUtils.repaintOverlayable(this). But that doesn't appear to work with an editable combo (because the combo's internal editor component needs repainting rather than the combo). In fact, the same problem occurs if the overlay is placed at the other end, over the drop button icon.