Added StatusPanel as an ImageObserver when drawing the background image.

This commit is contained in:
Matt Jensen
2008-12-19 20:21:09 +00:00
parent 4071e98ab5
commit 0453991622
@@ -6,13 +6,13 @@
// //
// Redistribution and use in source and binary forms, with or without modification, are permitted // Redistribution and use in source and binary forms, with or without modification, are permitted
// provided that the following conditions are met: // provided that the following conditions are met:
// //
// 1. Redistributions of source code must retain the above copyright notice, this list of // 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer. // conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of // 2. Redistributions in binary form must reproduce the above copyright notice, this list of
// conditions and the following disclaimer in the documentation and/or other materials provided // conditions and the following disclaimer in the documentation and/or other materials provided
// with the distribution. // with the distribution.
// //
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
@@ -144,7 +144,7 @@ public class StatusPanel extends JComponent
img = _bg.getImage(_progress); img = _bg.getImage(_progress);
} }
if (img != null) { if (img != null) {
gfx.drawImage(img, 0, 0, null); gfx.drawImage(img, 0, 0, this);
} else { } else {
gfx.setColor(getBackground()); gfx.setColor(getBackground());
gfx.fillRect(0, 0, getWidth(), getHeight()); gfx.fillRect(0, 0, getWidth(), getHeight());