564 |
|
|
565 |
protected void init(String text, Icon icon) |
protected void init(String text, Icon icon) |
566 |
{ |
{ |
567 |
this.text = text; |
// If text is null, we fall back to the empty |
568 |
|
// string (which is set using AbstractButton's |
569 |
|
// constructor). |
570 |
|
// This way the behavior of the JDK is matched. |
571 |
|
if(text != null) |
572 |
|
this.text = text; |
573 |
|
|
574 |
default_icon = icon; |
default_icon = icon; |
575 |
actionListener = createActionListener(); |
actionListener = createActionListener(); |
576 |
changeListener = createChangeListener(); |
changeListener = createChangeListener(); |