Minimum and maximun size for dockable


  1. Is it possible, indicate a minimum and maximum size for a dockable, and that this does not exceed these limits?

  2. If the answer to the above question is yes, is it possible that having only a dockable, this does not enlarge took all the size of the area available?

Thanks for everything and greetings!

There are no hard limits, the framework tries to respect the minimum size of a Dockable, but that does not always work (e.g. because the user makes the JFrame too small). There is no maximum size.

You can set the minimum size, by making sure the children-Components of the Dockable have proper “getMinimumSize/getPreferredSize” methods.

So there is no way to set a fixed size for a dockable?

What I want is to have a JFrame with 300px wide and 100px wide with dockable. So would an empty area of 200px. Is this possible? :frowning:

Thanks and Regards!

I fear there is no such feature. While it would be possible to implement such a feature, it would take quite some time to do so (we are speaking of several days of work). I personally do not have that time at the moment.

How about putting the CContentArea on a JPanel with a LayoutManager that allows shrinking (GridBagLayout should allow such things)? You could not move around the Dockable, but there might be some empty space. But I don’t think that solution would look good.

Ok, I can not think of how I can implement it, because you do not know well the framework.

Thanks for everything!