src/java.desktop/share/classes/java/awt/Component.java
changeset 59183 d0b0b4ee4481
parent 58309 c6f8b2c3dc66
equal deleted inserted replaced
59182:d0bfaae2ff33 59183:d0b0b4ee4481
  2970             ComponentPeer peer = this.peer;
  2970             ComponentPeer peer = this.peer;
  2971             boolean wasValid = isValid();
  2971             boolean wasValid = isValid();
  2972             if (!wasValid && peer != null) {
  2972             if (!wasValid && peer != null) {
  2973                 Font newfont = getFont();
  2973                 Font newfont = getFont();
  2974                 Font oldfont = peerFont;
  2974                 Font oldfont = peerFont;
  2975                 if (newfont != oldfont && (oldfont == null
  2975                 if (newfont != null && !Objects.equals(oldfont, newfont)) {
  2976                                            || !oldfont.equals(newfont))) {
       
  2977                     peer.setFont(newfont);
  2976                     peer.setFont(newfont);
  2978                     peerFont = newfont;
  2977                     peerFont = newfont;
  2979                 }
  2978                 }
  2980                 peer.layout();
  2979                 peer.layout();
  2981             }
  2980             }