Advertisement
Guest User

Untitled

a guest
Feb 13th, 2012
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. public void a(){
  2.             javax.swing.JComboBox comboBox = new javax.swing.JComboBox();      
  3.            ArrayList list = new ArrayList();
  4.            list.add("Value 1");
  5.            list.add("Value 2");
  6.            for (int i = 0; i < list.size(); i++)
  7.            {          
  8.                comboBox.addItem(list.get(i));
  9.             }  
  10.             TableCellEditor.getTableCellEditorComponent(jTable1, comboBox, true, 0, 0).setCellEditor(new javax.swing.DefaultCellEditor(comboBox));
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement