From da092fa251b684e29da5127d39864abe3c644eb3 Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Mon, 19 Jan 2009 13:42:40 +0000 Subject: [PATCH] Replace setOpaque(false) with setContentAreaFilled(false). --- .../impl/gui/customcontrols/SIPCommButton.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java index b9ab46b03..6cb88b72e 100755 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java @@ -51,7 +51,7 @@ public SIPCommButton( Image bgImage, // Explicitly remove all borders that may be set from the current // look and feel. this.setBorder(null); - this.setOpaque(false); + this.setContentAreaFilled(false); this.bgImage = bgImage; this.pressedImage = pressedImage; @@ -87,6 +87,18 @@ public SIPCommButton(Image bgImage) this(bgImage, null); } + /** + * Resets the background image for this button. + * + * @param bgImage the new image to set. + */ + public void setImage(Image bgImage) + { + this.bgImage = bgImage; + + this.repaint(); + } + /** * Overrides the paintComponent method of JButton to * paint the button background and icon, and all additional effects of this