Home > javafx > JavaFX – Splash Screen

JavaFX – Splash Screen


Bookmark and Share

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.

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&#34;></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.

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

Advertisements
Categories: javafx Tags:
  1. July 19, 2009 at 5:28 AM

    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.

  2. July 19, 2009 at 8:14 PM

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

  3. July 19, 2009 at 10:16 PM

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

  4. July 20, 2009 at 1:25 AM

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

  1. February 9, 2010 at 10:27 AM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: