i want to use a instrument like a switch or controller in java advance programing . how can i use this and which instrument i should use?