netbeans 中JTabbedPanel的使用
netbeans 中JTabbedPanel的使用
http://java.sun.com/developer/onlineTraining/tools/netbeans_part1/#importing
So far, you have created a project and a JFrame class called SamplesJFrame. Next, you'll build on theJFrame component and add other components.
- Click on Tabbed Pane in the Palette, then click on the blank square in the design form. This creates a
JTabbedPane. Notice that all the components you've created are listed in the Inspector window. - Click on Panel in the Palette, then click inside the
JTabbedPanein the editor (you may need to resize theJTabbedPaneso it is larger. AJPanelis created. Note that a new tabbed pane has been added toJTabbedPane. - Add another
JPanelto theJTabbedPanein the Design Editor. Another tab appears. You can add as many tabs as you like, but this tutorial covers only two.
上面的意思就是首先在JFrame中添加一个JTabbedPane,然后在点击右键,添加Panel即可。而不是继续添加JTabbedPane。
最后使用"编辑文本"来编辑每个tab中上面显示的名称。

浙公网安备 33010602011771号