return component;
}
});
jTable1.getColumnModel().getColumn(2).setCellRenderer(new DefaultTableCellRenderer() {
private JPanel viewPanel = new JPanel(new BorderLayout());
private JButton viewButton = new JButton("...");
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
if (column == 2 && value != null) {
final List<X509Certificate> chain = (List) value;
value = chain.iterator().next().getSubjectDN().getName();
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
viewPanel = new JPanel(new BorderLayout());
viewPanel.add(this, BorderLayout.CENTER);
viewPanel.add(viewButton, BorderLayout.EAST);
return viewPanel;
} else {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
return this;
}
}
});
jTable1.getColumnModel().getColumn(4).setCellRenderer(new DefaultTableCellRenderer() {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
if (value instanceof UserDataVOWS) {
value = ((UserDataVOWS) value).getUsername();