--- a/jdk/src/solaris/classes/sun/awt/X11/XButtonPeer.java Wed Oct 23 16:24:50 2013 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XButtonPeer.java Thu Oct 24 14:32:07 2013 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -79,10 +79,17 @@
return true;
}
- public void setLabel(java.lang.String label) {
- this.label = label;
- repaint();
+ @Override
+ public void setLabel(String label) {
+ if (label == null) {
+ label = "";
+ }
+ if (!label.equals(this.label)) {
+ this.label = label;
+ repaint();
+ }
}
+
public void setBackground(Color c) {
updateMotifColors(c);
super.setBackground(c);
@@ -257,10 +264,6 @@
drawMotif3DRect(g, x, y, w-1, h-1, pressed);
}
- public void setFont(Font f) {
- super.setFont(f);
- target.repaint();
- }
protected void paintFocus(Graphics g, int x, int y, int w, int h){
g.setColor(focusColor);
g.drawRect(x,y,w,h);