JavaFX - Splash Screen


I must have done this post a long time back.. Hmm.. Better late than never.. In all my post I haven't used an important feature - Splash Screen. In real world applications users may not be interested in the technology, they would like to use the application. So we must show splash-screen which is related to the application.

Update: Refer to Download Service Listener available in JRE 1.6.0_18

JavaFX deployment script provides arguments for specifying alternate image to be shown instead of default java logo. We can pass arguments loading_image_url, loading_image_width and loading_image_height to specify the image-url, width and height as shown below.

<script src="http://dl.javafx.com/1.2/dtfx.js"></script>
<script>
  javafx(
    {
      archive: "InterestingPhotos.jar",
      width: 240,
      height: 320,
      code: "interesting.Main",
      name: "InterestingPhotos",
      loading_image_url: "< url-to-image >/image.jpg",
      loading_image_width: 240,
      loading_image_height: 320
    }
  );
</script>

Now JavaFX Zembly Widget uses custom splash screen. Click on below image to load the applet.

<script src="http://dl.javafx.com/1.2/dtfx.js"></script> <script src="/rakeshmenonp/resource/ZemblyIP/ZemblyIP.js"></script>

Custom Splash Screen sample demonstrates this feature. Overall experience may not be as good on Mac platform due to older JRE version. Try it out and let me know feedback

Update: Post received two dzone entries!
Thanks a lot for your encouragement and support

<script type="text/javascript">var dzone_style = '2';</script> <script language="javascript" src="/rakeshmenonp/resource/SplashScreen/zoneit.js"></script>     <script type="text/javascript">var dzone_style = '2';</script> <script language="javascript" src="/rakeshmenonp/resource/SplashScreen/zoneit1.js"></script>

Comments:

To the existing html page i added three lines of code:
loading_image_url: "Url to image"
loading_image_width: 500,
loading_image_height: 500

But the applet is itself not loading. On commenting the changes made the applet loads.

Posted by Mohamed Sanaulla on July 19, 2009 at 10:58 AM IST #

@Mohamed Sanaulla I think you are missing "," towards end of loading_image_url: "Url to image".

Posted by Rakesh Menon on July 20, 2009 at 01:44 AM IST #

Was this new recently? I don't recall it being there in the 1.0 release.

Posted by Steven Herod on July 20, 2009 at 03:46 AM IST #

@Steven Herod Yes, JavaFX 1.2 allows to customize these applet parameters ( http://java.sun.com/developer/technicalArticles/javase/newapplets/ )

Posted by Rakesh Menon on July 20, 2009 at 06:55 AM IST #

Post a Comment:
Comments are closed for this entry.
About


The views expressed on this blog are my own and do not necessarily reflect that of my organization

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today