Container c = this.getContentPane();
JLabel lbl = new JLabel("Label");
c.add(lbl);
what is the difference between using the above method & this one ? knowing that both give same results
JLabel lbl = new JLabel("Label");
add(lbl);
& if I need to put many items in the frame I can just make many Panels and add them all to one mainpanel, I don't see any need for containers, sorry for such a basic question
I know no one does GUI by code now, but it is for studying purposes so..!