TableColumn col;
col = connectionTable.getColumnModel().getColumn(TCPMon.STATE_COLUMN);
col.setMaxWidth(col.getPreferredWidth() / 2);
col = connectionTable.getColumnModel().getColumn(TCPMon.REQ_COLUMN);
col.setPreferredWidth(col.getPreferredWidth() * 2);
ListSelectionModel sel = connectionTable.getSelectionModel();
sel.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent event) {
if (event.getValueIsAdjusting()) {
return;
}
ListSelectionModel m =
(ListSelectionModel) event.getSource();
int divLoc = outPane.getDividerLocation();
if (m.isSelectionEmpty()) {
setLeft(
new JLabel(
" "
+
TCPMon.getMessage("wait00",
"Waiting for Connection...")));
setRight(new JLabel(""));
removeButton.setEnabled(false);
removeAllButton.setEnabled(false);
saveButton.setEnabled(false);
resendButton.setEnabled(false);
} else {
int row = m.getLeadSelectionIndex();
if (row == 0) {
if (connections.size() == 0) {
setLeft(
new JLabel(
" "