Problem with the use of panels in Java

I am a POO student at the uni but my teachers have so far been very vague so I dedicate myself to learning on my own. So far, well, but a question arose regarding JPanel. Is it correct to make a panel for buttons, another for JLabel, etc? And if so, how do I put all the panels together in one window?