开发者

How to surround JTable with JScrollPane through windowbuilder?

In Eclipse Jigloo plugin you can right click on JTable and choose "surrond with JScrollPane".

But in windowbuilder pro plugin I can't find a way to开发者_StackOverflow中文版 make JTable with JScrollPane


Add a scroll pane to your UI. Then drag and drop the table onto the scroll pane. During the drag over scroll pane window builder will highlight its areas - make sure you drop onto the central one.


Alteratively the following also works nicely;

  1. Add a JTable
  2. Right click on the JTable in the tree view
  3. Select: Surround With > JScrollPane


Another option would be to use NetBeans to do some of your Swing layout.

I've had limited experience with WindowBuilder, but I use NetBeans for designing prototypes and find it much easier for creating UIs. The resulting code generated from NetBeans will also be viewable using WindowBuilder.


I am using WindowBuilder 1.7.0 and Swing designer 1.7.0 in Eclipse in Mac. At first I was finding similar menu like Jigloo which I did not find. My Jigloo always crash in Mac and show license message, so I discarded it :) Later with some playing, I found how to do it in WindowBuilder, specially if you have already designed the JTable/JTextArea/JTree and do not want to delete it. After that you need to put them scrollable. You can use the tree view on the left. Normally you cannot drag a component into the scroll view. However add the scroll view in the frame. Set proper layout to the component where you want to put the scroll view. Usually its BorderLayout, may in a JPanel. Drag the JScrollView into target area. Use the tree view for all these actions. Then finally drag the JTree/JTable into the JScrollPane in the frame design view. To my experience this works better. Play with the Layouting of the parent components.

How to surround JTable with JScrollPane through windowbuilder?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜