Java

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentJava

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old November 22nd, 2012, 08:04 AM
rifgin rifgin is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 2 rifgin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 27 m 3 sec
Reputation Power: 0
Angry Problem with javafx 2.0 set background image

guys..,
i need your help how to set up background image on the javafx..,
i'd try this coding:

String image = Intro.class.getResource("DSC_2552.JPG").toExternalForm();
root.setStyle("-fx-background-image: url('"+ image +"');"
+ "-fx-background-position: center center;"
+ " -fx-background-repeat : stretch;");


but.., don't succees..,

can anyone solve this..,
thank's..!

Reply With Quote
  #2  
Old November 23rd, 2012, 07:11 AM
rameye rameye is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 1 rameye User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 57 m 41 sec
Reputation Power: 0
Would you perhaps be using Netbeans 7.2.x ? I am having problems with both the inline Node.setStyle() and via stylesheets with Scene.getStylesheets().add()

It is seeming that the CSS parser in NetBeans 7.2 is balking on many of the JavaFX style property values. -fx-background-image is one of them. It complains that url is not a valid token, although we all know that it is.

To see how bad this is, extract caspian.css from the jfxrt.jar, and then add it to your JavaFX project and view using the editor. Yellow ! triangles all over the place.

I read somewhere in the bug resolution lists that the problem has been resolved in Netbeans 7.3, but 7.3 is not released yet, although the latest 7.3 beta can be downloaded.

Reply With Quote
  #3  
Old November 26th, 2012, 02:18 PM
rifgin rifgin is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 2 rifgin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 27 m 3 sec
Reputation Power: 0
Quote:
Originally Posted by rameye
Would you perhaps be using Netbeans 7.2.x ? I am having problems with both the inline Node.setStyle() and via stylesheets with Scene.getStylesheets().add()

It is seeming that the CSS parser in NetBeans 7.2 is balking on many of the JavaFX style property values. -fx-background-image is one of them. It complains that url is not a valid token, although we all know that it is.

To see how bad this is, extract caspian.css from the jfxrt.jar, and then add it to your JavaFX project and view using the editor. Yellow ! triangles all over the place.

I read somewhere in the bug resolution lists that the problem has been resolved in Netbeans 7.3, but 7.3 is not released yet, although the latest 7.3 beta can be downloaded.
THANK'S..,
so.., i must download jfxrt.jar..?, ok..,

did you know a coding how to set a background image in javafx, without css..?
and once more again.,
can you share here.., how to call a new project on javafx 2 with cycling call?., or how to call new class in one packet..?

sorry for my poor english

Last edited by rifgin : November 26th, 2012 at 02:24 PM.

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentJava > Problem with javafx 2.0 set background image


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap