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.
The use of gradient paints in PartialEdgeBorder is potential performance bottleneck. Also the whole code is suspicious - it tries to paint several lines but I can see only one (that is not well aligned with shadows next to component).
The alignment issue is fixed, and the use of transparent colors; re painting several lines, it should do something like this: (0 = background color, 4 = shadow color) 0 0 10 20 210 310 321 421 432 432 443 443 444 444 to create a realistic shadow effect. Probably not the most intuitive code to read, but much simpler than creating our own Paint subclass. Not too worried about performance impact with this - GradientPaints allocate a raster for their pixels, so memory consumption (the thing that cost us in the memory meter) is proportional to width * height, and these will never be bigger than 1.6 pixels. There are more efficient ways to do this sort of thing, but much more complex.
verified/closed