Question: Is it possible to add a button to a tabbed pane like in firefox.

![enter image description here](https://i.stack.imgur.com/vtVsG.png)

The plus-button is what I want.

Thanks

Answer: 
I think you should be able to manage it by building your own `JTabbedPaneUI` and setting it on the `JTabbedPane` using `setUI`.

Your `ComponentUI` has methods to get a hold of the accessible children. If you specify a `JButton` and a `JLabel` then you may be in business.

I haven't attempted this myself though. This is "at your own risk" :)
Write Following Code in Default Constructor Of Class

```
    JPanel panel = new JPanel();
    tabbedPane.addTab("Welcome", null, panel, null);
    tabbedPane.addTab(" + ", null, panel1, null);

    tabbedPane.addChangeListener(new ChangeListener()
    {
        public void stateChanged(ChangeEvent evt)
        {
            JTabbedPane tabbedPane = (JTabbedPane)evt.getSource();

            if(tabbedPane.getSelectedIndex() == tabbedPane.indexOfTab(" + "))
            {
                createTab();
            }
        }
    });

```

And Create Method to declare and initialized `int tab2 = 2;` at Starting of main class. Its Worked. 

```
private void createTab()
{
    tabbedPane.addTab("New Tab",new Panel());
    tabbedPane.addTab(" + ",null,panel1,null);
    tabbedPane.setSelectedIndex(tab2);
    tab2++;
}

```