Qual função desse método? - Eu pesquisei mas não consegui compreender sua fundão.
Obs, tentei usar em JButton.
Qual função desse método? - Eu pesquisei mas não consegui compreender sua fundão.
Obs, tentei usar em JButton.
É um método herdado de javax.swing.AbstractButton.
public void setContentAreaFilled(boolean b)
Sets the
contentAreaFilledproperty. Iftruethe button will paint the content area. If you wish to have a transparent button, such as an icon only button, for example, then you should set this tofalse. Do not callsetOpaque(false). The default value for the thecontentAreaFilledproperty istrue.This function may cause the component’s opaque property to change.
The exact behavior of calling this function varies on a component-by-component and L&F-by-L&F basis.
Parameters:
b- if true, the content should be filled; if false the content area is not filled
Como diz a documentação dele, ele altera a propriedade contentAreaFilled. Se for true, o botão pintará o conteúdo.