Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Java (https://www.askmehelpdesk.com/forumdisplay.php?f=440)
-   -   Jcombobox in jtable (https://www.askmehelpdesk.com/showthread.php?t=735806)

  • Feb 23, 2013, 04:59 PM
    nicyoda
    jcombobox in jtable
    I am setting a JComboBox in a JTable. The first item in the JComboBox is the JComboBox string object:

    javax.swing.JComboBox[,0,0,0x0,invalid,layout=javax.swing.plaf.metal.Met alComboBoxUI$MetalComboBoxLayoutManager,alignmentX =0.0,alignmentY=0.0,border=,flags=328,maximumSize= ,minimumSize=,preferredSize=,isEditable=false,ligh tWeightPopupEnabled=true,maximumRowCount=8,selecte dItemReminder=]

    If I click on the JComboBox in the table column, it opens up with the items I have added.

    TableColumn col = Table.getColumnModel().getColumn(1);
    col.setCellEditor(new DefaultCellEditor(myJcomboBox);

    I just can't figure this out. Any answers?
    Thanks

  • All times are GMT -7. The time now is 11:14 AM.