I have a JFrame in which constructor I call initComponents() generated by Netbeans. It initializes the GUI created in Netbean's design editor. After that I create a new JLabel and call content.add(label) where content is a JPanel which is visible. Next I call validate(). The JLabel won't appear. What's wrong?
LayoutManager
are you using? The default layout manager used by NetBeans is theFreeform
layout manager. It was designed to used by the form editor and was not designed to be used by hand. It's possible that with the lack of constraints, your label is simply been ignored – MadProgrammer