this.log = tf;
// construct. Has to be final for inner class to access
final JComboBox combo=new JComboBox(treasure);
combo.setMaximumRowCount(5);
// combo box sends item events
combo.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent e)
{
log.setText("Combo: " + combo.getSelectedItem());
}
});
add(combo);