@Override
        public void changed(
            ChangeEvent event,
            Actor actor )
        {
            // find the selected item
            Item selectedItem = null;
            int selectedIndex = ( (SelectBox) actor ).getSelectionIndex();
            if( actor == shipModelSelectBox ) {
                selectedItem = ShipModel.values()[ selectedIndex ];
            } else if( actor == frontGunSelectBox ) {
                selectedItem = FrontGun.values()[ selectedIndex ];
            } else if( actor == shieldSelectBox ) {
                selectedItem = Shield.values()[ selectedIndex ];
            } else {
                return;
            }

            // if the ship already contains the item, there is no need to buy it
            if( ship.contains( selectedItem ) ) return;

            // try and buy the item
            if( profile.buy( selectedItem ) ) {
                creditsLabel.setText( profile.getCreditsAsText() );
            }

            // update the widgets
            updateValues();
        }