Adding a button component to a java tabbed pane in java

后端 未结 2 652
误落风尘
误落风尘 2021-01-23 09:05

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

相关标签:
2条回答
  • 2021-01-23 09:46

    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.

    0 讨论(0)
  • 2021-01-23 09:54

    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.

    0 讨论(0)
提交回复
热议问题