void () { super.addNotify(); if (getParent() instanceof JTable) { putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE); } Toolkit.getDefaultToolkit().addAWTEventListener(this, AWTEvent.WINDOW_EVENT_MASK); }