So on Java , an "AND" statement is &&, "OR" statement is ||...
What about for XOR then... that is if I have two choices. I HAVE to pick one, but I can't pick both.
HOWEVER,
private class CheckBoxListener implements ItemListener{ public void itemStateChanged(ItemEvent e) { if(one.isSelected()^two.isSelected()){ thehandler handler = new thehandler(); button.addActionListener(handler); } }} Even if I have both checkboxes selected, the button is 'enabled'. This is the handler for the button fyi:
private class thehandler implements ActionListener{ public void actionPerformed(ActionEvent event){ dispose(); } So if both are selected, and If i click the button. the frame should not dispose. It should only dispose when either one of them is selected.