My question is why doesn't my program work, and by that I mean : (when I click that check box it makes text bold), when I do this in my Study constructor : JCheckBox cb = new JCheckBox("bold"), but when I do it like the example below it works. Please answer, I'm dying to know.Thanks
public class Study extends JFrame {
private JCheckBox cb;
private JTextField tf;
public Study () {
cb = new JCheckBox("bold");
tf = new JTextField(25);
and later on some more code..
}