Have you come to this decision? Here is my opinion on things ...
Overriding getInsets() looks like a nice solution if you have a simple style with few contexts. This should help maintain the integrity of the attachments in your GUI with only one point of change.
Applying an empty border to components for this purpose seems a bit hacky. If you need to apply a custom border to a component, you can accidentally delete an empty border if you do not override the setBorder() methods to use a composite border.
Setting all inputs to 0 is not necessary, since they start from 0 already ... I would be very scared by the thought of rewriting drawing methods! This is usually done to add finishing touches to the components, and not to redefine all their boundaries.
I am not quite sure how the creation of the new ComponentUI will help, since it mainly concerns calibration and drawing (for example, above).
First I will try option 1, as it will have a global impact on your application, and then it will begin to develop those exceptions and contexts that you want to insert into it.
source share