Action[] () { return ArrayUtil.append(super.createActions(), new AbstractAction("Next Tab Placement") { @Override public void actionPerformed(ActionEvent e) { JTabbedPane tabbedPane = UIUtil.findComponentOfType(getRootPane(), JTabbedPane.class); if (tabbedPane == null) return; int placement = tabbedPane.getTabPlacement(); placement++; if (placement > SwingConstants.RIGHT) placement = TOP; tabbedPane.setTabPlacement(placement); } }); }