jcombobox as cell editor java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location

后端 未结 4 1340
天命终不由人
天命终不由人 2021-01-19 10:20

I am using a custom JComboBox as a cell editor in a JTable. When the users gets to the cell using keyboard controls it tries to open the popup. This causes the following e

4条回答
  •  星月不相逢
    2021-01-19 11:01

    I second (third? fourth?) everyone asking for a pared-down example of a table using your custom combobox any maybe a bit of the code from the combobox itself, but just to take a stab at it anyway...have you tried making a customized version of EditorDelegate to go with your other custom code and moving the code for showing the popup from focusGained() into your delegate's startCellEditing() method?

提交回复
热议问题