Code example for RadioButton

Methods: setEnabled, setChecked

0
		if ( memoryLocationsTypes[id] == TYPE_BYTE ) {
			byteButton.setChecked( true );
			intButton.setChecked( false );
		} else { 
			byteButton.setChecked( false );
			intButton.setChecked( true );
		} 
 
		if ( id == 0 ) {
			enable = true;
		} 
		updateLocationEditability( enable );
	} 
 
	private void setInitialValues ( ) { 
		locationSpinner.setSelection( 1 );
		setItemSelected( 1 ); 
	} 
 
	private void updateLocationEditability ( boolean enable ) {
		// updates the enabling/disabling of the location & radio buttons based 
		// on the location drop down menu 
		byteButton.setEnabled( enable );
		intButton.setEnabled( enable );
		locationText.setEnabled( enable );
		if ( enable ) {
			locationText.requestFocus();
		} else { 
			valueText.requestFocus();