[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug swing/35901] New: AbstractButton.imageUpdate() always returns false
From: |
freebeans at xqb dot biglobe dot ne dot jp |
Subject: |
[Bug swing/35901] New: AbstractButton.imageUpdate() always returns false. |
Date: |
10 Apr 2008 12:39:21 -0000 |
Curent implementation:
---
return current_icon == img;
---
It seems "current_icon" does not initialized.
I think AbstractButton.imageUpdate() should be:
---
ButtonModel model = getModel();
Icon icon = null;
if (! model.isEnabled()) {
if (model.isSelected()) {
icon = disabledSelectedIcon;
} else {
icon = disabledIcon;
}
} else if (model.isRollover()) {
if (model.isSelected()) {
icon = rolloverSelectedIcon;
} else {
icon = rolloverIcon;
}
} else if (model.isPressed()) {
icon = pressed_icon;
} else {
icon = default_icon;
}
if (! (icon instanceof ImageIcon) || ((ImageIcon) icon).getImage() !=
img) {
return false;
}
return super.imageUpdate(img, infoflags, x, y, w, h);
---
--
Summary: AbstractButton.imageUpdate() always returns false.
Product: classpath
Version: 0.97
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: swing
AssignedTo: roman at kennke dot org
ReportedBy: freebeans at xqb dot biglobe dot ne dot jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35901
- [Bug swing/35901] New: AbstractButton.imageUpdate() always returns false.,
freebeans at xqb dot biglobe dot ne dot jp <=