`
ladymaidu
  • 浏览: 679844 次
文章分类
社区版块
存档分类
最新评论

netbeans 中JTabbedPanel的使用

 
阅读更多

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.

  1. 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.
  2. Click on Panel in the Palette, then click inside theJTabbedPanein the editor (you may need to resize theJTabbedPaneso it is larger. AJPanelis created. Note that a new tabbed pane has been added toJTabbedPane.
  3. Add anotherJPanelto 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中上面显示的名称。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics