Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4079889
Votes 1
Synopsis need to implement text-icon gap in AbstractButton
Category java:classes_swing
Reported Against 1.2 , 1.3
Release Fixed 1.4(merlin-beta2)
State 10-Fix Delivered, request for enhancement
Priority: 4-Low
Related Bugs 4348042
Submit Date 17-SEP-1997
Description
need to implement text-glyph gap in AbstractButton

see JLabel for interface
Work Around
N/A
Evaluation
Buttons should behave the same as labels. Indeed, the fix is to copy the
icon-gap code from Labels.
  xxxxx@xxxxx   1998-03-17




Introducing the new integer iconGap property meets a difficulty:
There is no way to say whether it is set by user or by LAF.
because this property has integer type. We can't use UIResource
mechanism which applies only to properties of object type.

The issue can be solved using an isIconGapSet() method which tells
whether the property was set by user code.

  xxxxx@xxxxx   2000-07-13

======================================================================
Comments
  
  Include a link with my name & email   

Submitted On 09-APR-1999
DumaisP
Do it!


Submitted On 09-AUG-1999
tedyoung
What's taking so long? This is almost TWO years old!!  "Buttons should
behave the same as labels" is exactly right.  In fact, I'm surprised the
code for both of these things hasn't been further merged.
However, there is a workaround, kludgy as it might be, by going directly to the
"Button.textIconGap" UIManager property: UIManager.put(
"Button.textIconGap", new Integer( someTextIconGapValue ) )


Submitted On 10-AUG-1999
tedyoung
Oops - forgot to mention that changing the UIManager property affects ALL
buttons, so it's not a complete workaround.



PLEASE NOTE: JDK6 is formerly known as Project Mustang