e828. creating a jtabbedpane container.txt

来自「这里面包含了一百多个JAVA源文件」· 文本 代码 · 共 16 行

TXT
16
字号
A tabbed pane is a container that displays only one child component at a time. Typically, the children are themselves containers of other components. Each child is associated with a visible tab on the tabbed pane. The user can choose a child to display by selecting the tab associated with that child. 
    // Create a child container which is to be associated with a tab
    JPanel panel = new JPanel();
    // Add components to the panel...
    
    // Specify on which edge the tabs should appear
    int location = JTabbedPane.TOP; // or BOTTOM, LEFT, RIGHT
    
    // Create the tabbed pane
    JTabbedPane pane = new JTabbedPane();
    
    // Add a tab
    String label = "Tab Label";
    pane.addTab(label, panel);

⌨️ 快捷键说明

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