Programming Examples

Are you a Programmer or Application Developer or a DBA? Take a cup of coffee, sit back and spend few minutes here :)

Tag Archive for ‘addTab’

JTabbedPane – Add Tabs Dynamically

JTabbed Pane Example

Marker 1 and 2 show the controls placed on a panel and the panel placed on the top portion of the Frame Window. The Marker 3 and 4 together form the JTabbedPane. Marker three shows three tabs: Person Name, Person Age and Education. This shows an idea of how we packed related information in a Tab. The above screen shows that the user is on the Person Name tab. To switch between the tabs, the user will click on the Tab Name.

Buttons Top, Bottom, Left and Right changes the tab placement. For example, if you click Left, the tabs will get arranged in the left edge of the Frame Window. The Radio buttons Scroll, and Wrap will decide how the JTabbedPane arranges the tabs when there is no space to fit-in the new tab.

Continue Reading →