HI guys,
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.
thanks
Violet_82 89 Posting Whiz in Training
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Violet_82 89 Posting Whiz in Training
Violet_82 89 Posting Whiz in Training
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Violet_82 89 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.