1. Please follow Java coding conventions. A class name should start with an uppercase letter, and the first letter of each internal word should be capitalized. TabbedPane1, not tabbedpane1
2. All Swing components should be constructed and their methods called only on the EDT, unless specifically documented as thread-safe. And some of that documentation is wrong in that respect up to Java 6 (corrected in Java 7), so it's safer to call all swing methods, with the possible exception of repaint(), on the EDT. If you don't understand what I'm saying, find and go through the Oracle tutorial on 'Concurrency in Swing.'
3. Your question isn't very clear. What's a 'sub tab?' Have you gone through the tutorial linked from the API for JTabbedPane?
There are no new questions, but there may be new answers.