Terai Atsuhiro 2021-04-17 (土) 02:58:20

http://terai.xrea.jp/swing/tabwidth/screenshot.png

tab1.setUI(new javax.swing.plaf.basic.BasicTabbedPaneUI() {
  protected int calculateTabWidth(int tabPlacement, int tabIndex,
                                  FontMetrics metrics) {
    int i = super.calculateTabWidth(tabPlacement, tabIndex, metrics);
    return (i<100) ? 100 : i;
  }
});
public String makeTitle(String title) {
  return "<html><table width='100'><tr><td align='center'>"+
          title+
         "</td></tr></table>";
}