},
new String[]{
"Things"
}
) );
thingsTable.addMouseListener( new MouseListener() {
public void mouseReleased(MouseEvent e) {
}
public void mousePressed(MouseEvent e) {
}
public void mouseExited(MouseEvent e) {
}
public void mouseEntered(MouseEvent e) {
}
public void mouseClicked(MouseEvent e) {
if ( cmd == null ) {
return;
}
int row = thingsTable.rowAtPoint( e.getPoint() );
int col = thingsTable.columnAtPoint( e.getPoint() );
Thing t = (Thing) thingsTable.getModel().getValueAt( row,
col );
cmdTextField.setText( cmdTextField.getText() + t.getName() + " " );
cmd.add( t );
}
} );
JScrollPane itemsPanel = new JScrollPane( thingsTable );
parent.add( itemsPanel,
"top, left" );
exitsTable = new JTable();
exitsTable.setPreferredScrollableViewportSize( new Dimension( 245,
250 ) );
exitsTable.setBorder( null );
exitsTable.setModel( new NonEditableTableMode(
new Object[][]{
},
new String[]{
"Exits"
}
) );
exitsTable.addMouseListener( new MouseListener() {
public void mouseReleased(MouseEvent e) {
}
public void mousePressed(MouseEvent e) {