private void updateRegion ( ) { actMessagePanel . setVisible ( false ) ; if ( rbtACT . isSelected ( ) ) { actMessagePanel . setVisible ( true ) ; regionFields . setVisible ( true ) ; regionSelector . setOptions ( new String [ ] { null , "Belconnen" , "City" , "Woden" } ) ; regionSelector . setVisible ( true ) ; } else if ( rbtNSW . isSelected ( ) ) { regionFields . setVisible ( true ) ; regionSelector . setOptions ( new String [ ] { null , "Hunter" , "Riverina" , "Southern Tablelands" } ) ; regionSelector . setVisible ( true ) ; } else if ( rbtVIC . isSelected ( ) ) { regionFields . setVisible ( true ) ; regionSelector . setOptions ( new String [ ] { null , "Gippsland" , "Melbourne" , "Mornington Peninsula" } ) ; regionSelector . setVisible ( true ) ; } else { regionSelector . setOptions ( new Object [ ] { null } ) ; regionSelector . setVisible ( false ) ; regionFields . setVisible ( false ) ; } }
Updates the visibility and options present in the region selector depending on the state selector s value .