0

Regards.

I need to change the size of the "tab" of a tabbedpane but i don´t know how, hope someone can help me.

    JButton l = new JButton("first tab");
    l.setPreferredSize(new Dimension(50, 50));


    JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    tabbedPane.setTabComponentAt(1, l);
    tabbedPane.setBackground(Color.WHITE);
    frame.getContentPane().add(tabbedPane, BorderLayout.CENTER);

in the previous code i have tried to add a button as a tab but no works.

tab example of my program 2

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
HARRY
  • 1
  • 1
  • This question has already been answered here -> https://stackoverflow.com/questions/11360964/adding-icon-on-jtabbedpane-tab – Alex_M Feb 19 '18 at 12:44
  • Possible duplicate of [Adding icon on JTabbedpane tab](https://stackoverflow.com/questions/11360964/adding-icon-on-jtabbedpane-tab) – Jérôme Feb 19 '18 at 12:49
  • i need to resize the tab size – HARRY Feb 19 '18 at 12:55

0 Answers0