java - Change padding/inset of image within JButton -


how make distance between icon , text less/smaller?

enter image description here

use seticontextgap

to reduce gap 1 pixel:

button.seticontextgap(button.geticontextgap() - 1); 

to increase 1 pixel:

button.seticontextgap(button.geticontextgap() + 1); 

Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -