Configurable panel position

Hi there,

I've created a Configurable ProjectComponent. In the createComponent method I return the root JPanel of a Class created with the GUI Designer. As far as I can tell I haven't set any sizes or positions in the GUI Class.

Every time I go into the preferences and select my plugin UI, the preference Window is resized and repositioned (in my situation it even jump all the way to my second Monitor).

Is there something I should do to make sure the JPanel 'packs' properly into the existing Preference Window?

Regards,

Onno

1 comment
Comment actions Permalink

I pinpointed the problem. I was using a JEditorPane inside a JScrollPane. The JEditorPane had its contentType set to text/hml and I initialized it with setText to hold some HTML. (I use it for showing plugin documentation)

As soon as I either don't set the contentType (showing HTML as plain text) or I don't set an initial value with setText, everything works as expected. So it probably has got to do with me using the JEditorPane wrongly, although I was surprised to see that apparently the content of a JEditorPane can cause the containing Window to rescale and relocate.

0

Please sign in to leave a comment.