⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e839. enable scrolling tabs in a jtabbedpane container.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
By default, all the tabs in a tabbed pane are displayed. When the tabs are wider than the width of the tabbed pane, they are displayed in rows. If space is an issue, it is possible to configure the tabs to appear in a single row along with a scroller that allows the tabs to be scrolled into view. 
    // Create a tabbed pane
    JTabbedPane pane = new JTabbedPane();
    
    // Add some tabs...; see e830 Adding a Tab to a JTabbedPane Container
    // Get the number of rows of tabs
    int rows = pane.getTabRunCount();
    
    // Get the current layout policy
    int policy = pane.getTabLayoutPolicy(); // WRAP_TAB_LAYOUT
    
    // Configure the tabs to scroll
    pane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -