[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.albireo] JComboBox Focus Problem

If a JComboBox is used in a second swt shell embedded into a SwingControl and the JComobBox is using a javax.swing.Popup$HeavyWeightWindow, this popup window will be moved on top of the primary shell while the second shell (including the rest of the JComboBox) will be moved in the background. This only occures if the popup of the JComboBox will be openend the second time.

To quick fix this problem I added following to the method handleOpenedWindow(WindowEvent event) in the class AwtDialogListener:
..
if (window.getClass().getName().equals("javax.swing.Popup$HeavyWeightWindow")) {
try {
window.setAlwaysOnTop(false);
} catch (SecurityException se) {
// setAlwaysOnTop is restricted,
// the exception is ignored
}
}
..