The documentation for the ComponentBoundsConstrainer class says the following:
“A class that imposes restrictions on a Component’s size or position.
The base class can impose some basic size and position limits, but you can also subclass this for custom uses.”
The most basic position constrain I can think of is that you can confine a Component to a rectangle. However, I can’t find any trace of this functionality in the description of the methods of the ComponentBoundsConstrainer class.
Did I miss something? If indeed this functionality is not included, is there any example around for how to implement this simple constraint? And, does it really make sense to use this class (or subclass thereof)? Wouldn’t it be simpler to adjust positions by hand in mouseDrag()?