setContentAreaFilled(false)

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 contentAreaFilled property. If true the 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 to false . Do not call setOpaque(false) . The default value for the the contentAreaFilled property is true .

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.

1 curtida