fix some bugs from Sonar 06032019

This commit is contained in:
Ingmar Goudt 2019-03-06 23:01:05 +01:00
parent e68b79336a
commit ee3f592186
6 changed files with 20 additions and 31 deletions

View file

@ -22,15 +22,9 @@ public class MageJDesktop extends JDesktopPane {
public void updateUI() {
if ("Nimbus".equals(UIManager.getLookAndFeel().getName())) {
UIDefaults map = new UIDefaults();
Painter painter = new Painter() {
final Color color = null;
@Override
public void paint(Graphics2D g, Object c, int w, int h) {
g.setColor(color == null ? UIManager.getDefaults().getColor("desktop") : color);
g.fillRect(0,0,w,h);
}
Painter painter = (g, c, w, h) -> {
g.setColor( UIManager.getDefaults().getColor("desktop") );
g.fillRect(0,0,w,h);
};
map.put("DesktopPane[Enabled].backgroundPainter", painter);
putClientProperty("Nimbus.Overrides", map);