PDA

View Full Version : CheckBox menu item Decrypt


dsptl
03-30-2010, 01:22 AM
I am working on a project and part of ask for:

* add a CheckBox menu item Decrypt which can be checked for decrypt or unchecked for Encrypt. This item should be tied to the toggle button in the GUI. Both should reflect the current status of encrypting/decrypting in the application

which is I not sure how to begin with

Fou-Lu
03-30-2010, 03:14 PM
Assuming you're using swing (can be done just as easily with awt, but the naming will be swing), you can use the JCheckBox class to create a check box on a GUI. Tying it to another button is as simple as using listeners, and detecting the current state is not something I can help you with; that will be dependant completely on the project and how it makes its determinations.
Check this Java tutorial relating to buttons, checkboxes, radio buttons, etc: http://java.sun.com/docs/books/tutorial/uiswing/components/button.html