Guest User

Untitled

a guest
Jul 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. public class MyTableCellEditor extends AbstractCellEditor implements TableCellEditor {
  2. JComponent component = new JComboBox();
  3. component.addItem( new JLabel( "test" ) );
  4. component.addItem( new JLabel( "test2" ) );
  5.  
  6. public Component getTableCellEditorComponent(JTable table, Object value,
  7. boolean isSelected, int rowIndex, int vColIndex) {
  8.  
  9. return component;
  10. }
  11.  
  12. public Object getCellEditorValue() {
  13. return "test";
  14. }
  15. }
Add Comment
Please, Sign In to add comment