How do i know if a Jcheckbox is checked?with GUI [duplicate]
问题 This question already has an answer here : How do i know if a Jcheckbox is checked?in GUI [closed] (1 answer) Closed 6 years ago . can you tell me in details how do i know if a jcheckbox is checked or not? method isSelected didn't work with me it gives me an exception while running { Sandwich = new JButton("Tall"); contentPane.add(Tall); Sandwitch.setBounds(350, 110, 90,40); //in main Sandwitch.addActionListener(this); } ..... public void actionPerformed(ActionEvent event) { JButton