Tolgar
asked on
How to disable a button in Java?
I have a Java code and this code creates a GUI. In this GUI, I would like to disable a button if certain condition (let's say none of the check boxes are selected) is not satisfied.
This is how I create the button:
In here, I would like to set change image_navigate_right with a grayed out image and I want it to be not clickable.
How can I do it?
This is how I create the button:
item23 = new ToolItem(custToolBar22.getToolBar(), SWT.PUSH);
item23.setImage(image_navigate_right); item23.setText("Run checks"); item23.setToolTipText("Run the checks against the files you selected");
item23.addListener(SWT.Selection, toolBarListener);
In here, I would like to set change image_navigate_right with a grayed out image and I want it to be not clickable.
How can I do it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.