You had that part right the first time.
tabPane.add(panel, "Tab One");
Type: Posts; User: KevinWorkman
You had that part right the first time.
tabPane.add(panel, "Tab One");
Yeah, the problem is that you aren't really using layouts how you should be. Which JLabel are you trying to align? You don't even add label1 at all.
This uses a BorderLayout to get your JLabel to...
What do you mean? You eliminate any code that doesn't have to do with your problem, and you put it in a single compilable/runnable class so other people can simply copy and paste it into their own...
No. If you don't know how to post an SSCCE, that's why I provided a link that explains exactly how to do it. Check it out and let me know if you have any questions.
Code you post should be in SSCCE form, that way we know exactly what you're doing. For example, what layout are you using?
Until I see an SSCCE, I can only point you towards this tutorial: Lesson:...