I am new to using swing and I am trying to find a good way to organize a window with multiple tabs. I have found the info on Sun's website but I still need to manipulate the positions and alignments of those tabs more than what it covers.

I also can't seem to figure out a way to build this using NetBeans IDE either. One tab isn't a problem, but anything past that doesn't seem to work.

Also if anyone is wondering I am attempting to mimick the Google kitchen sink demo with my app as a way of getting intimate with all of the Swing components.

Thanks

To do it with netbeans, you add one JTabbedPane to a JPanel or JFrame. Then I think you add JPanels to that JTabbedPane, and it automatically makes these JPanels into tabs. To flip between the tabs, you click them on the side where it has the listing of all your components. If this doesn't work for you or doesn't make sense, I'll open netbeans when I get back to my machine and I'll give you a step by step breakdown.

Oh, and to do it just using Swing w/o netbeans doing it for you, you'd instantiate a new JTabbedPane, then use the addTab method. You can look this up in the docs.

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.