This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
it would be nice if someone could tell me the difference between JFrame and JPanel,
You don't add components to frames, you add components to a Container (typically a Jpanel). Behind the scenes the frame.add(...) method adds the component to the content pane, which is actually a JPanel.
Again start by reading the Swing tutorial, thats why I provide the link with my first answer. Start with the "Using Top-Level Containers" section for more info.
Joined: Jan 30, 2010
Ok, thanks once more for a quick reply!
Now it is more understandable. - The story about JFrame and JPanel.
Just one more short question.
I will check all layouts out, but I need quick solution for my problem. Maybe You ran the code ? I would like to put two group box (where I will have labels and 2 textFields and one combo box). So what, upon Your opinion, would be the best solution concerning Layouts ?
We're more about teaching people to fish here than handing out fish. So in line with your "quick solution" based on your code I can't give any since it uses null layout. I join the chorus in recommending you read the Swing tutorials including and especially the layout manager section. There you will find your "quick solution". Luck.