This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
it's a regression comparing to 070529 My widget has two children with vertical flow layout with justify option, first child has more children, I'm applying resize border next way: setBorder(BorderFactory.createResizeBorder(15)); And my widget jumps, I'll recheck tomorrow if it's my fault, but I don't remember any significant changes in my sample here in last days. See attached image showing shift of widget.
Created attachment 43268 [details] shifted selected and unshifted widgets
Caused by wrong justification in FlowLayout class. Fixed in main trunk.
Not sure if it's the same issue, I can filr a new one if necessary In my case widget selection works better today, no jumps on initially placed widget selection (i.e. border applied outside of widget area and do not affect the widget), but after resizing(top side up) border is drawn within widget area, i.e. collapse/jump/shift widget a bit, tried with my 'WidowSTyle' resize strategy and with default action created by 'createResizeAction()'
And additionally, before resize there is some strange shift which is good visible in satellite view, and is almost invisible in scene view (only a minor scroll bar shift)
This new jump is caused by expanding policy of a scene. The scene is a smallest encapsulation boundary of all widgets (including their borders) in the scene. In case you are using LayerWidget, then [0,0] point is included too. When you add a border to your widget (which is top-left most widget in negative coords in the scene), then you are expanding the size of the widget to all 4 sides. Therefore the scene has to be expanded too. The workaround is easy - borders for all the ObjectStates have to have the same insets. E.g. use ResizeBorder(8) for selected objects and otherwise OpaqueBorder(8). Unfortunately I cannot change this expanding policy since I do not have a replacement for it. If the proposed solution/workaround is ok, please, close the issue as WorksForMe. Thanks.
Ok it's not a big issue, but not sure setting opaque border will not affect other area, may be I'll file another less priority issue for the behavior, for example scene expands and vertical scroll appears even if widget+border is fully visible Ok to set this issue as resolved. What about inner/outer border applying?
The problem is that the widget border is a part of the widget boundary by definition. Regarding the scrollbar issue: Please, file a separate issue regarding that. Note that if you have a connection widget attached to it, it may reserver some space around it (e.g. Anchor does not have a rectangular boundary - it has radius property only).