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.
org.netbeans.modules.form.palette.CPComponentLarge$PaletteListRenderer 1. crashes with NPE when ui default for "Button.border" is null. This can happen using certain look&feels(including the one I am developing at the moment). The following change would have no impact on the default look&feels, but would work wonderful (instead of crashing) with several other look&feels: public PaletteListRenderer() { ... buttonBorder = button.getBorder(); if (buttonBorder != null) { emptyBorder = new EmptyBorder(buttonBorder.getBorderInsets(button)); } ... 2. If the look&feel defines a minimum width for buttons which exceeds the palette icons, the left alignment looks awful. Workaround: setting to center alignment public void setIconSize(int size) { if (size == BeanInfo.ICON_COLOR_16x16) { /* --> */ button.setHorizontalAlignment(SwingConstants.CENTER); // changed this button.setVerticalTextPosition(SwingConstants.CENTER); button.setHorizontalTextPosition(SwingConstants.RIGHT); } else { ...
Looks reasonably, I'm going to apply it.
But the alignment must stay left if "show names" is set...
Fixed in dev trunk.
Verified