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.