JCheckBox tradeButton;
Next invoke the javax.swing.JCheckBox constructor, as follows:
tradeButton = new JCheckBox("Trade Customer", false);
This creates a check box button labeled "Trade Customer" with the initial state set to off. We could have used an alternative constructor JCheckBox ("Trade Customer") because this sets the initial state to off by default. There is also the constructor JCheckBox(), which creates an unlabeled check box button with the initial state set to off.
No comments:
Post a Comment