开发者

CheckBox menu item Decrypt in JAVA GUI

开发者 https://www.devze.com 2022-12-25 04:55 出处:网络
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. B

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

w开发者_开发知识库hich is I not sure how to begin with


well to start with, have you created a gui with a JCheckbox and a JToggleButton? If so start by getting your gui created, i'm assuming you are using swing??

Then add an action listener to the checkbox and the togglebutton. You can find a tutorial on action listeners here. Then in the action listener you can check the state of the checkbox and togglebutton and adjust as necessary.

Give this a shot, and post here if you run into problems.

0

精彩评论

暂无评论...
验证码 换一张
取 消