Skip to content

Commit a697e53

Browse files
hansonrhansonr
authored andcommitted
allows enable foreground change for labels
1 parent 6dc52cf commit a697e53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSLabelUI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public JSLabelUI() {
3232
@Override
3333
public DOMNode updateDOMNode() {
3434
if (domNode == null) {
35-
domNode = newDOMObject("label", id);
35+
enableNode = domNode = newDOMObject("label", id);
3636
textNode = iconNode = null;
3737
// labels are different from buttons, because we allow them to have
3838
// different centerings - left, top, middle, bottom, etc.
@@ -48,7 +48,7 @@ public DOMNode updateDOMNode() {
4848
setAlignments((AbstractButton) (JComponent) label);
4949
}
5050
if (jc.isEnabled())
51-
setBackground(jc.isOpaque() ? jc.getBackground() : null);
51+
setBackgroundCUI(jc.isOpaque() ? getBackground() : null);
5252
return updateDOMNodeCUI();
5353
}
5454

0 commit comments

Comments
 (0)