Skip to content
Browse files
4819544: SwingSet2 JTable Demo throws NullPointerException
Reviewed-by: pbansal, aivanov
  • Loading branch information
prsadhuk committed Aug 5, 2021
1 parent 6c8441f commit 64d18d45ef885d5cdd893b7f56236d3f22b4b84c
Showing 1 changed file with 4 additions and 1 deletion.
@@ -549,7 +549,10 @@ public JScrollPane createTable() {
public int getRowCount() { return data.length;}
public Object getValueAt(int row, int col) {return data[row][col];}
public String getColumnName(int column) {return names[column];}
public Class<?> getColumnClass(int c) {return getValueAt(0, c).getClass();}
public Class<?> getColumnClass(int c) {
Object obj = getValueAt(0, c);
return obj != null ? obj.getClass() : Object.class;
public boolean isCellEditable(int row, int col) {return col != 5;}
public void setValueAt(Object aValue, int row, int column) { data[row][column] = aValue; }

1 comment on commit 64d18d4

Copy link

@openjdk-notifier openjdk-notifier bot commented on 64d18d4 Aug 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.