The tabs of a tabbed pane can be placed on one of the four edges of its container. By default, when a tabbed pane is created, the tabs are placed on top.

    // Create a tabbed pane with the tabs on top
    JTabbedPane pane = new JTabbedPane();
    
    // Get current location
    int loc = pane.getTabPlacement();  // TOP
    
    // Create a tabbed pane with tabs at a particular location
    int location = JTabbedPane.LEFT; // or TOP, BOTTOM, RIGHT
    pane = new JTabbedPane(location);
    
    // Change the tab location
    pane.setTabPlacement(JTabbedPane.BOTTOM);

 

Related Examples

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2022-01-16
  • 2021-11-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-11
相关资源
相似解决方案