I need your help in netbeans !!!?
-
HI everyone ,i need your help in my program , my program is about database , i designed buttons and menus for the operations , now i need to make checkbox to allow the user to disable the work of the buttons or make them enable by clicking the chechbox again , what code i have to write for this operation !!!!
-
Answer:
JCheckbox uses ItemListener class MyDBProgram { JButton button; JCheckbox enableCkBox; boolean isEnabled; ... public MyDBProgram() { isEnabled = true; enableCkBox = new JCheckbox("Enable Opt"); enableCkBox.setSelected( true ); enableCkBox.addItemListener( this ); ... public vod itemStateChanged( Item e ) { Object source = e.getItemSelectable(); if( source == enableCkBox) { isEnabled = !isEnabled; // and also enableButton(); } private void enableButton() { button.setEnabled( isEnabled ); } }
liana at Yahoo! Answers Visit the source
Related Q & A:
- I need desperate help.Best solution by Yahoo! Answers
- I need Ebay help.Best solution by Yahoo! Answers
- I need some help about yahoo answers.Best solution by Yahoo! Answers
- I need major help with iTunes.Best solution by Yahoo! Answers
- I need slight help with filling out the FAFSA.Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.