as I'm gettng into Java GUI again after a long time, I'm trying hard to remember things, but not everything is that clear anymore.
I'm in the process of building a very simple GUI application with a few buttons.
First question is about the JFrame and JPanel. From what I remember - and what I found online - the JFrame is at the top level of the hierarchy, but do I need to have a JPanel in my application or can I put my GUI components directly onto the JFrame (providing my class extends the JFrame of course)? It's a little comfusing for me because I've seen code with a JPanels and GUI components on them but I've also seen JFrames with GUI components on them and I'm not sure why we can do both or when we should do one or the other.