netbeans 中JTabbedPanel的使用
http://java.sun.com/developer/onlineTraining/tools/netbeans_part1/#importing
So far, you have created a project and aJFrameclass calledSamplesJFrame. Next, you'll build on theJFramecomponent 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中上面显示的名称。
本文介绍如何在NetBeans IDE中使用JTabbedPane组件创建选项卡界面。通过简单的步骤,包括添加JTabbedPane到JFrame,以及如何进一步添加JPanel到JTabbedPane上,创建多个选项卡。
960

被折叠的 条评论
为什么被折叠?



