panle create by ToolbarDecorator have a space

Answered
ToolbarDecorator toolbarDecorator = ToolbarDecorator.createDecorator(table);
toolbarDecorator.setRemoveAction(null);
toolbarDecorator.setAddAction(null);
toolbarDecorator.setMoveUpAction(null);
toolbarDecorator.setMoveDownAction(null);
tablePanel = toolbarDecorator.createPanel();

 

I don't know what reason,all table create by toolbarDecorator have a spacing but not aligin left!

 

 

 

correct effect

7 comments
Comment actions Permalink

maybe is is not cause by ToolbarDecorator,but i can not find the problem.

all panel have a space before component

0
Comment actions Permalink

debug the code get the layout, but the Layout Manager is GridLayoutManager in UI designer

0
Comment actions Permalink

right click the UiDesigner and click preview 

occur error

 

Exception in thread "main" java.lang.NoClassDefFoundError: com/intellij/ui/IdeBorderFactory$PlainSmallWithIndent
at com.intellij.uiDesigner.FormPreviewFrame.$$$setupUI$$$(FormPreviewFrame.java)
at com.intellij.uiDesigner.FormPreviewFrame.<init>(FormPreviewFrame.java:11)
at com.intellij.uiDesigner.FormPreviewFrame.main(FormPreviewFrame.java:18)
Caused by: java.lang.ClassNotFoundException: com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 3 more
0
Comment actions Permalink

code have not change but the ui changed! this is very queer!

I check out the plugin code and  run first time is correct,Then click ui designer "show expert properties" and run again ,the panel border disappear!

0
Comment actions Permalink

Please share link to full project, it's most likely related to UI Form. Also consider using Kotlin UI DSL instead of manually designed forms (https://plugins.jetbrains.com/docs/intellij/kotlin-ui-dsl.html)

0
Comment actions Permalink

Thanks,help much!

I delete the xxx.form and create component by code , no space appear!

UI Form maybe indeed have some problems

0

Please sign in to leave a comment.