i am trying to create GUI using java swings.I am just a beginner in java swings. My primary idea was to create two tabs and add a button in one of the tabs.
I wanted to
You can try by using setTabComponentAt method.
This methd has the parameter setTabComponentAt(int index, Component component)
, in which you just mention the component you want.
You can refer a link here.
I'm not sure I understand your intent, but you might try the approach shown in the TabComponentsDemo, discussed in How to Use Tabbed Panes: Tabs With Custom Components.
A related example is shown here.