Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to add padding to background Image of button?

drashti-JavaNetJul 17 2015

I have 10 buttons and each button has its own background image.I want to set top and bottom padding to each image.I have tried below code but it doesn't work.

#15{

    -fx-background-image: url("drawer.png");

     -fx-padding-top: 10px;

     -fx-padding-top: 10px;

}

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2015
Added on Jul 17 2015
0 comments
558 views