Wednesday Jul 15, 2009

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>

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