开发者

Netbeans Matisse GUI Builder ... separate GUI containers in more than one class?

By default, Netbeans will create all of your drag and drop components into a single class file.

I am using a JPanel with 3 tabs. I would like to separate each tab as a separate class in Netbeans Matisse. Is 开发者_如何学Pythonthere such a way of doing that, or am I stuck with a one class implementation under this GUI builder?


Yes, There is a way to do that through Java beans.

Step 1: Create your tabs Step 2
Step 2: For each of your tabs create a new file(JavaBeans Objects/Customizer)
Step 3: Create the GUI for your tabs and then go back to the file with your tabbed pane in and select a tabbed pane.
Step 4: Open the palette and under 'Beans' (At the bottom) chose 'Choose Bean'
Step 5: Now in the popup, enter the full class name including package and click OK.
Step 6: Resize the bean
Step 7: Complete for other tabs and hey presto.

I believe that this method will work as i have used it in the past.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜