Sunday 15 June 2014

java - Need jSpinner to be enabled from jRadioButton -


I am working in JTabbedPane inside JFrame. I have a jRadioButton, which I need to choose to enable / enable two JSPP controls, which is the selection date & amp; Time. I am not getting any references to how this should be completed and this is not a school project.

I need JSPNer to be disabled, while JRDObutton is clear and enabled when selected. JRadioButton is a part of the two button buttons group. When another jRadioButton is enabled, a jTextField will open to enter data.

Any help or links for the document will be useful. Whatever I have found, I have not yet told how to link these two.

Thanks

Try the listener on your radio button JRDO button to control JSpinner Here's a simple example for sure you want to add some logic / other listener to handle your other components too, (JTextField etc.).

Hope this helps!

  final JRadioButton spinner button = new gearbox ("spinner enabled"); SpinnerButton.addItemListener (New Item Listener) {@ Override Public Wide ItemSet Switch (Item Event E) {If (Spinner Button Selected.) {Spinner. Enabled (true);} and {spinner .etc enabled (false) ;}}});    

No comments:

Post a Comment