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 use css Property:-fx-background-image for Pane or Region?

904231Dec 8 2011 — edited Dec 12 2011
I need some help,I have tryed some examples like:

Pane paneitem = new Pane();
paneitem .setStyle("-fx-background-color: black;");
paneitem .setStyle("-fx-background-image: url('images/title_content_01.jpg')");

but it didn't work.

I just wana making some beautilfull Components like some Html Tags.
For exampls:
[<]div style=(background-image:url('images/title_content_01.jpg');background-repeat:repeat-x;width:220;height:27)[>]
div contents
[<]/div[>]

Thanks everyone ! waiting for your help.

Edited by: 901228 on 2011-12-8 上午2:12
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 9 2012
Added on Dec 8 2011
10 comments
3,053 views