Icedtea-web splashscreen implementation

Jiri Vanek jvanek at redhat.com
Wed Aug 1 06:55:23 PDT 2012


on 07/31/2012 03:33 AM, Omair Majid wrote:

>> >The only "not fixed" is separation of net.sourceforge.jnlp.LaunchHandler
>> >for each applet. I have trued to separate it somehow cleanly and
>> >harmlessly but without success. So I would like to proceed without this
>> >modification (especially for 1.3) and try to figure out more for head.
> Hm.. I would have liked to see that.
>

So do I. But I really would like to separate this. I promise that I will look at this soon (although
not imminently)

...
> Controller (extra l).
  >
> Nit: getPanel() makes it sound like the return type is JPanel.
  >
> Sounds like InformationElement should be named InformationContent (or
> maybe the methods should be named getInformation/setInformation ?).
  >
> Does the caller have to call setPluginHeight(height),
> setPluginWidth(widhth) followed by adjustForSize(width, height) ?
> Perhaps adjustForSize can be an internal detail? I really dont think
> adjustForSize should be taking extra parameters though.
  >> >+public class MoovingText extends TextWithWatterLevel {
  > MovingText. TextWithWaterLevel.
>
All above fixed.

>> >+
>> >+    public void paint(Graphics g);
>> >+
>> >+    public void paintComponent(Graphics g);
>> >+
>> >+    public void update(Graphics g);
> I don't think paint/paintComponent/update to be exposed as public. They
> are implementation details, right?
>

I have removed really redundant paintComponent and update, but kept paint.  Splash is graphical
object and have to be able to paint itself.

>> >+    SplashReason getSplashReason();
>> >+    public String getVersion();
>> >+    public int getPercentage();
> Just a question: do you really need all the getFoo methods? Seems like
> the controller will be setting the values, so nothing should have to
> query it. Maybe I am mistaken.

Get percentage  was kept, and other getters moved to package private for testing. Is it ok for you?
>
>> >diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/SplashUtils.java
>> >--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> >+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashUtils.java	Mon Jul 23 14:52:44 2012 +0200
>> >+public class SplashUtils {
>> >+
>> >+    static final String ICEDTEA_WEB_PLUGIN_SPLASH = "ICEDTEA_WEB_PLUGIN_SPLASH";
>> >+    static final String ICEDTEA_WEB_SPLASH = "ICEDTEA_WEB_SPLASH";
>> >+    static final String NONE = "none";
>> >+    static final String DEFAULT12 = "default12";
> What's DEFUALT12?

Argh - I should have expalined earlier. I have change it to DEFAULT = "default" which is returning
DefaultSpalshScreen2012 now.

I have also renamed those *12 clases to 2012 classes. My intention was to name it differently then
"Default*" for case that in future new splashcreen will be implemented.
>
>> >+    public static void showErrorCaught(Throwable ex, AppletInstance appletInstance) {
>> >+        try {
>> >+            showError(ex, appletInstance);
>> >+        } catch (Throwable t) {
>> >+            if (JNLPRuntime.isDebug()) {
>> >+                // prinitng this exception is discutable. I have let it in for case that
>> >+                //some retyping will fail
>> >+                t.printStackTrace();
> For HEAD (not 1.3) maybe consider throwing an InternalError(t) or
> RuntimeException(t) instead?
>

Hmm. .Why not.

>> >+    public static void showError(Throwable ex, AppletEnvironment ae) {
>> >+        if (ae == null) {
>> >+            return;
>> >+        }
>> >+        NetxPanel p = ((NetxPanel) (ae.getAppletFrame()));
> Is NetxPanel a SplashController?

It is. Fixed. Thanx.
>
>> >+    private static SplashReason determineCaller(StackTraceElement[] stackTrace) {
>> >+        for (StackTraceElement stackTraceElement : stackTrace) {
>> >+            if (stackTraceElement.getClassName().contains(JNLPSplashScreen.class.getSimpleName())) {
>> >+                return SplashUtils.SplashReason.JAVAWS;
>> >+            }
>> >+
>> >+        }
>> >+        return SplashUtils.SplashReason.APPLET;
>> >+    }
> Instead of querying the stack, perhaps we can set this from, say,
> JNLPRuntime?

done.
>
>
>> >diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSpalshScreen12.java
>> >--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> >+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSpalshScreen12.java	Mon Jul 23 14:52:44 2012 +0200
>> >+public final class DefaultErrorSpalshScreen12 extends BasicComponentErrorSplashScreen {
> s/Spalsh/Splash/
>
> What's the significance of 12 in the name?

version (year) fixed a bit, see above.
>
>> >+
>> >+    private final DefaultErrorSpalshScreen12 self;
>> >+    //scaling
> Is this a comment for a variable that was removed?
>
>> >+    //for clicking ot error message
>> >+    ErrorPainter painter;
> Please make this private.
>
sure, private final as shuld be

>> >+//        try {
>> >+//            tmpBackround = ImageIO.read(new File("/home/jvanek/Desktop/icedteaplugin.jpg"));
>> >+//        } catch (Exception ex) {
>> >+//            ex.printStackTrace();
>> >+//        }
> Please remove this.
done, and little bit more.
>
>> >+        // Add a new listener for resizes
>> >+        addComponentListener(new ComponentListener() {
>> >+            // Nothing to do for this
>> >+
>> >+            @Override
>> >+            public void componentShown(ComponentEvent e) {
>> >+            }
>> >+            // Re-adjust variables based on size
>> >+
>> >+            @Override
>> >+            public void componentResized(ComponentEvent e) {
>> >+                self.adjustForSize(getWidth(), getHeight());
>> >+                repaint();
>> >+            }
>> >+            // Nothing to do for this
>> >+
>> >+            @Override
>> >+            public void componentMoved(ComponentEvent e) {
>> >+            }
>> >+            // Nothing to do for this
>> >+
>> >+            @Override
>> >+            public void componentHidden(ComponentEvent e) {
>> >+            }
>> >+        });
> You may be able to use ComponentAdapter to cut down the size of this code.

I'm not fan of adapters, but as you wish :)
>
>> >+    @Override
>> >+    public void paintComponent(Graphics g) {
>> >+        paint(g);
>> >+    }
>> >+
>> >+    @Override
>> >+    public void paint(Graphics g) {
>> >+        painter.paint(g);
>
> I think just paintComponent should be overridden. Swing's implementation
> of paint will call paintComponent at the right time.

Disagree here. paint and paintcomponet are two different things called at different times (although
(and you are right) for swing the only important one is paintComponent). State that both paint* are
painting the same is just lucky coincidence and  unless you insists, i would like to kept both
methods filled.
>
>> >diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSpalshScreen12.java
>> >--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> >+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSpalshScreen12.java	Mon Jul 23 14:52:44 2012 +0200
>> >@@ -0,0 +1,155 @@
>> >+public final class DefaultSpalshScreen12 extends BasicComponentSplashScreen {
> This class looks a lot like the last one. There's not much too much code
> here. Perhaps you can refactor it into a shared class or something?

Yap. I was aware of this when I was posting.
When you look to the ancestors hierarchy:
DefaultSplashScreen2012 extends BasicComponentSplashScreen and
public abstract class BasicComponentSplashScreen extends JComponent implements SplashPanel

DefaultErrorSplashScreen2012 extends BasicComponentErrorSplashScreen
BasicComponentErrorSplashScreen extends BasicComponentSplashScreen implements SplashErrorPanel
   SplashErrorPanel extends SplashPanel

You can see that I'm in dead end to use common ancestor for both default implementations.

And because I prefer inheritance before composite I let it be. But I agree. There is no need to have
this logic separated (although I thought it  should be at first). So the mebber with shared logic is
now included in both DefaultErrorSplashScreen2012 and DefaultErrorSplashScreen2012


>
>> >diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultspalshscreen12/BasePainter.java
>> >--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> >+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultspalshscreen12/BasePainter.java	Mon Jul 23 14:52:44 2012 +0200
>> >@@ -0,0 +1,511 @@
>> >+public class BasePainter {
>> >+
>> >+    protected final BasicComponentSplashScreen master;
>> >+    //animations
>> >+    //level of water (0-100%)
>> >+    private int level = 0;
> Maybe just call this variable waterLevel? Although it would be even
> better to call it something that is more semantically meaningful. What
> does that water level reflect?

Surprisingly level of water in text:)

All variables around renamed to be more accurate.

>
>> >+    //waving of water and position of shhadowed WEB
>> >+    private int level2 = 0;
>> >+    private int l2inc = 15; //how quickly is greyed web moving
> Likewise ;)
>
>> >+    //inidivdual sizes, all converging to ZERO!!
>> >+    private final int WEB_TOP_ALIGMENT = 324;
>> >+    private final int WEB_LEFT_ALIGMENT = 84;
> How did you drive these numbers.

:))) I was trying, measuring and testing until the splash looked well. (and was zooming correctly)
>
>> >+    public final void startAnimationThreads() {
>...
>> >+        };
>> >+        tt.setDaemon(true);
>> >+        return tt;
>> >+    }
> My first instic would be to have the animator thread in the controller.
> The controller would signal when it's time for the view to update, and
I would rather those threads encapsualted inside painter. Look at it like to MVC micro-environment;)
> the view would repaint itself. What shuts this thread down?

Two stops by themselves, and the last (of main animation) is stopped by stopAnimation method when
spalsh is about to be removed or repalced.

>> >+    public void cleareCachedWatter() {
>> >+        oldTwl = null;
>> >+    }
> clearCachedWater, I think. But I would encourage you to go with a more
> genric name (the implementation will be the same, of course). Maybe
> something like reset() or clear() ?

fixed

>> >diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultspalshscreen12/NatCubic.java
>> >--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> >+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultspalshscreen12/NatCubic.java	Mon Jul 23 14:52:44 2012 +0200
> I am guessing this is from NatCubic as well?
>> >diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultspalshscreen12/ControlCurve.java
>> >--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> >+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultspalshscreen12/ControlCurve.java	Mon Jul 23 14:52:44 2012 +0200
>> >@@ -0,0 +1,184 @@
>> >+/** This class represents a curve defined by a sequence of control points */
>> >+/*  Part of NatCubic implementation, inspire byhttp://www.cse.unsw.edu.au/~lambert/*/
> Could you clarify this bit? Is this code copied from NatCubic?

The only main computation is. As there is no licence and I have spoken (and got approve) with author
it should be ok.

>
>> >diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultspalshscreen12/ErrorPainter.java
>> >--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> >+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultspalshscreen12/ErrorPainter.java	Mon Jul 23 14:52:44 2012 +0200
>> >+    private Thread getErrorScreamThread() {
>> >+        // Create a new thread to screem error  when failure
> I am not sure I follow. Could you explain the purpose?

When error occurs, big red ERROR fly through splash, but just for momnet. And then it is here no
longer. This is what I have called ErrorScream:) During it fly  the splash interpolate from normal
state to greyed one with button to show stacktrace.

>
>
>> >diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultspalshscreen12/ImageFontCutter.java
>> >--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> >+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultspalshscreen12/ImageFontCutter.java	Mon Jul 23 14:52:44 2012 +0200
>> >+public class ImageFontCutter {
>  From what I can tell, this is supposed to draw strings. Why the font
> cutter name? Maybe something like TextRenderer might be more
> appropriate? With a method named render:
> render (Image image, String text, Font font) { .... }

Actually not - it is really taking image and cut from this image shape in  shapes of letters.
>
> Just a thought.
>
>> >+    /**
>> >+     * @return the s
>> >+     */
>> >+    public String getS() {
> Does 's' have a special meaning here?
>

Renamed to getText.

>
>> >diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItem.java
>> >--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> >+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItem.java	Mon Jul 23 14:52:44 2012 +0200
>> >+/**
>> >+ *description element: A short statement about the application. Description elements are optional. The kind attribute defines how the description should be used. It can have one of the following values:
>> >+ *
>> >+ *   * one-line: If a reference to the application is going to appear on one row in a list or a table, this description will be used.
>> >+ *   * short: If a reference to the application is going to be displayed in a situation where there is room for a paragraph, this description is used.
>> >+ *   * tooltip: If a reference to the application is going to appear in a tooltip, this description is used.
>> >+ *
>> >+ * Only one description element of each kind can be specified. A description element without a kind is used as a default value. Thus, if Java Web Start needs a description of kind short, and it is not specified in the JNLP file, then the text from the description without an attribute is used.
>> >+ *
>> >+ * All descriptions contain plain text. No formatting, such as with HTML tags, is supported.
>> >+ */
> Please limit to 80 columns!
fixed
>
>> >+    @Override
>> >+    public String toXml() {
>> >+        if (kind==null){
>> >+            return super.toXml();
>> >+        }
>> >+        return "<"+type+" kind=\""+kind+"\">"+value+"</"+type+">";
>> >+    }
> Hm.. what's this for? Do we ever output anything in XML?

I'm using it in tests to generate jnlps on the  fly.

>
>
>> >diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/InfoItem.java
>> >--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> >+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/InfoItem.java	Mon Jul 23 14:52:44 2012 +0200
>> >+
>> >+/**
>> >+ *The optional kind="splash" attribute may be used in an icon element to indicate that the image is to be used as a "splash" screen during the launch of an application. If the JNLP file does not contain an icon element with kind="splash" attribute, Java Web Start will construct a splash screen using other items from the information Element.
>> >+ *If the JNLP file does not contain any icon images, the splash image will consist of the application's title and vendor, as taken from the JNLP file.
>> >+ *
>> >+ * items not used inside
>> >+ */
>> >+public class InfoItem {
> Much of this is more-or-less an exact duplicate of existing code. I know
> you want to avoid mixing parsing code with code for splash screen, but
> please consider reducing the duplication. As it is, if an additional
> element is added to the jnlp file, multiple locations will have to be
> changed. This is a bad idea from a maintenance point of view. It is
> likely this code will start to rot.
>
>> >diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java
>> >--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> >+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java	Mon Jul 23 14:52:44 2012 +0200
>> >+public class JEditorPaneBasedExceptionDialog extends javax.swing.JDialog implements HyperlinkListener {
> A screenshot of this might be nice (but not needed). It's hard for me to
> 'see' what this looks like.
>
> Anyway, my recommendation is to use JOptionPane's dialog if at all possible.

Do you remember 90mb gif ? You can se this dialog here.

http://download.englab.brq.redhat.com/scratch/jvanek/gif.gif

The only difference since this gif is IcedTea instead of ICEDtea

>> >+    @SuppressWarnings("unchecked")
>> >+    private void initComponents() {
>> >+
>> >+        jPanel2 = new javax.swing.JPanel();
>> >+        jButton1 = new javax.swing.JButton();
>> >+        jButton2 = new javax.swing.JButton();
>> >+        jPanel1 = new javax.swing.JPanel();
>> >+        jLabel1 = new javax.swing.JLabel();
>> >+        jLabel2 = new javax.swing.JLabel();
>> >+        jPanel3 = new javax.swing.JPanel();
>> >+        jScrollPane1 = new javax.swing.JScrollPane();
>> >+        jEditorPane1 = new javax.swing.JEditorPane();
>> >+        jButton3 = new javax.swing.JButton();
> Can we have some cleaner names, please?
>
> Also, this looks like some terrible ide-generated code :(

Yap. Netbeans have generation of stubs. I have reworked this class to be much more human readable.
Sorry for inconvenience.

>
>> >+    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
>> >+        if (exception != null) {
>> >+            try {
>> >+                StringSelection data = new StringSelection(getExceptionStackTraceAsString(exception));
>> >+                Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
>> >+                clipboard.setContents(data, data);
> Hm... is this code running with full privileges? Can it access the
> clipboard?

it is funny, but this works both with signed and unsigned applets (because of package
net.sourceforge.jnpl?).
>
>> >+            } catch (Exception ex) {
>> >+                JOptionPane.showMessageDialog(this, Translator.R(InfoItem.SPLASH + "cantCopyEx"));
>> >+                ex.printStackTrace();
>> >+            }
>> >+        } else {
>> >+            JOptionPane.showMessageDialog(this, Translator.R(InfoItem.SPLASH + "noExRecorded"));
>> >+        }
>> >+        close();
>> >+    }
>> >+
>> >+    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
>> >+        // TODO add your handling code here
>> >+        jEditorPane1.setText(message);
>> >+        jButton3.setVisible(false);
>> >+    }
>> >+
>> >+    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
>> >+        // TODO add your handling code here:
>> >+        close();
>> >+    }
> Could you clarify the method names? Also, please remove the spurious TODOs.

fixed
>
>> >+    // Variables declaration - do not modify
>> >+    private javax.swing.JButton jButton1;
>> >+    private javax.swing.JButton jButton2;
>> >+    private javax.swing.JButton jButton3;
>> >+    private javax.swing.JEditorPane jEditorPane1;
>> >+    private javax.swing.JLabel jLabel1;
>> >+    private javax.swing.JLabel jLabel2;
>> >+    private javax.swing.JPanel jPanel1;
>> >+    private javax.swing.JPanel jPanel2;
>> >+    private javax.swing.JPanel jPanel3;
>> >+    private javax.swing.JScrollPane jScrollPane1;
>> >+    // End of variables declaration
> /me mumbles something about IDEs presuming too much.
>
> But seriously, what happens if I do modify this? Say I have to remove a
> button to resolve a (usability) bug. Will it completely break things for
> your IDE?

Nothing will happen. Just stub was generated. Misleading text removed, varibles renamed.
>
> I am going to review the other patches later. Sorry to leave you hanging
> like this.
>
> Cheers,
> Omair
>

Thank you for your time and for nice review,

Best Regards,
     J.




-------------- next part --------------
diff -r 01544fb82384 Makefile.am
--- a/Makefile.am	Wed Jul 11 16:18:58 2012 +0200
+++ b/Makefile.am	Wed Aug 01 13:40:20 2012 +0200
@@ -174,6 +174,7 @@
 edit_launcher_script = sed \
   -e 's|[@]LAUNCHER_BOOTCLASSPATH[@]|$(LAUNCHER_BOOTCLASSPATH)|g' \
   -e 's|[@]JAVAWS_BIN_LOCATION[@]|$(bindir)/$(javaws)|g' \
+  -e 's|[@]JAVAWS_SPLASH_LOCATION[@]|$(datadir)/$(PACKAGE_NAME)/javaws_splash.png|g' \
   -e 's|[@]ITWEB_SETTINGS_BIN_LOCATION[@]|$(bindir)/$(itweb_settings)|g' \
   -e 's|[@]JAVA[@]|$(JAVA)|g' \
   -e 's|[@]JRE[@]|$(SYSTEM_JRE_DIR)|g'
@@ -204,6 +205,7 @@
 	${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
 endif
 	${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar
+	${INSTALL_DATA} $(NETX_SRCDIR)/javaws_splash.png $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/javaws_splash.png
 	${INSTALL_PROGRAM} launcher.build/$(javaws) $(DESTDIR)$(bindir)
 	${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar
 	${INSTALL_PROGRAM} launcher.build/$(itweb_settings) $(DESTDIR)$(bindir)
diff -r 01544fb82384 NEWS
--- a/NEWS	Wed Jul 11 16:18:58 2012 +0200
+++ b/NEWS	Wed Aug 01 13:40:20 2012 +0200
@@ -9,6 +9,7 @@
 CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
 
 New in release 1.3 (2012-XX-XX):
+* Splash screen for javaws and plugin
 * NetX
   - PR898: signed applications with big jnlp-file doesn't start (webstart affect like "frozen")
   - PR811: javaws is not handling urls with spaces (and other characters needing encoding) correctly
diff -r 01544fb82384 launcher/javaws.in
--- a/launcher/javaws.in	Wed Jul 11 16:18:58 2012 +0200
+++ b/launcher/javaws.in	Wed Aug 01 13:40:20 2012 +0200
@@ -5,6 +5,7 @@
 LAUNCHER_FLAGS=-Xms8m
 CLASSNAME=net.sourceforge.jnlp.runtime.Boot
 BINARY_LOCATION=@JAVAWS_BIN_LOCATION@
+SPLASH_LOCATION=@JAVAWS_SPLASH_LOCATION@
 PROGRAM_NAME=javaws
 CP=@JRE@/lib/rt.jar
 
@@ -15,6 +16,10 @@
 i=0
 j=0
 
+SPLASH="false"
+if [ "x$ICEDTEA_WEB_SPLASH" = "x" ] ; then
+SPLASH="true"
+fi;
 while [ "$#" -gt "0" ]; do
   case "$1" in
     -J*)
@@ -24,6 +29,9 @@
     *)
       ARGS[$j]="$1"
       j=$((j+1))
+      if [ "$1" = "-headless" ] ; then
+        SPLASH="false"
+      fi
       ;;
   esac
   shift
@@ -32,6 +40,10 @@
 k=0
 COMMAND[k]="${JAVA}"
 k=$((k+1))
+if [ "$SPLASH" = "true" ] ; then
+COMMAND[k]="-splash:${SPLASH_LOCATION}"
+k=$((k+1))
+fi;
 COMMAND[k]="${LAUNCHER_BOOTCLASSPATH}"
 k=$((k+1))
 COMMAND[k]="${LAUNCHER_FLAGS}"
diff -r 01544fb82384 netx/javaws_splash.png
Binary file netx/javaws_splash.png has changed
diff -r 01544fb82384 netx/net/sourceforge/jnlp/GuiLaunchHandler.java
--- a/netx/net/sourceforge/jnlp/GuiLaunchHandler.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/GuiLaunchHandler.java	Wed Aug 01 13:40:20 2012 +0200
@@ -1,5 +1,5 @@
 /* GuiLaunchHandler.java
-   Copyright (C) 2011 Red Hat, Inc.
+   Copyright (C) 2012 Red Hat, Inc.
 
 This file is part of IcedTea.
 
@@ -54,7 +54,7 @@
  */
 public class GuiLaunchHandler extends AbstractLaunchHandler {
 
-    private JNLPSplashScreen splashScreen = null;
+    private volatile JNLPSplashScreen splashScreen = null;
     private final Object mutex = new Object();
     private UpdatePolicy policy = UpdatePolicy.ALWAYS;
 
@@ -80,10 +80,13 @@
     }
 
     private void closeSplashScreen() {
-        synchronized(mutex) {
+        synchronized (mutex) {
             if (splashScreen != null) {
                 if (splashScreen.isSplashScreenValid()) {
                     splashScreen.setVisible(false);
+                    if (splashScreen.isCustomSplashscreen()) {
+                        splashScreen.stopAnimation();
+                    }
                 }
                 splashScreen.dispose();
             }
@@ -102,40 +105,56 @@
 
     @Override
     public void launchInitialized(final JNLPFile file) {
-        
+
         int preferredWidth = 500;
         int preferredHeight = 400;
 
         final URL splashImageURL = file.getInformation().getIconLocation(
                 IconDesc.SPLASH, preferredWidth, preferredHeight);
 
+        final ResourceTracker resourceTracker = new ResourceTracker(true);
         if (splashImageURL != null) {
-            final ResourceTracker resourceTracker = new ResourceTracker(true);
             resourceTracker.addResource(splashImageURL, file.getFileVersion(), null, policy);
-            synchronized(mutex) {
-                try {
-                    SwingUtilities.invokeAndWait(new Runnable() {
-                        @Override
-                        public void run() {
-                            splashScreen = new JNLPSplashScreen(resourceTracker, null, null);
-                        }
-                    });
-                } catch (InterruptedException ie) {
-                    // Wait till splash screen is created
-                    while (splashScreen == null);
-                } catch (InvocationTargetException ite) {
-                    ite.printStackTrace();
-                }
+        }
+        synchronized (mutex) {
+            try {
+                SwingUtilities.invokeAndWait(new Runnable() {
 
-                splashScreen.setSplashImageURL(splashImageURL);
+                    @Override
+                    public void run() {
+                        splashScreen = new JNLPSplashScreen(resourceTracker, file);
+                    }
+                });
+            } catch (InterruptedException ie) {
+                // Wait till splash screen is created
+                while (splashScreen == null);
+            } catch (InvocationTargetException ite) {
+                ite.printStackTrace();
             }
+            try {
+                SwingUtilities.invokeAndWait(new Runnable() {
+
+                    @Override
+                    public void run() {
+                        splashScreen.setSplashImageURL(splashImageURL);
+                    }
+                });
+            } catch (InterruptedException ie) {
+                // Wait till splash screen is created
+                while (splashScreen == null);
+            } catch (InvocationTargetException ite) {
+                ite.printStackTrace();
+            }
+
+
         }
-        
+
         SwingUtilities.invokeLater(new Runnable() {
+
             @Override
             public void run() {
-                if (splashImageURL != null) {
-                    synchronized(mutex) {
+                if (splashScreen != null) {
+                    synchronized (mutex) {
                         if (splashScreen.isSplashScreenValid()) {
                             splashScreen.setVisible(true);
                         }
diff -r 01544fb82384 netx/net/sourceforge/jnlp/InformationDesc.java
--- a/netx/net/sourceforge/jnlp/InformationDesc.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/InformationDesc.java	Wed Aug 01 13:40:20 2012 +0200
@@ -34,7 +34,8 @@
     // specification name.
 
     /** one-line description */
-    public static final Object ONE_LINE = "oneline";
+    /**http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html**/
+    public static final Object ONE_LINE = "one-line";
 
     /** short description */
     public static final Object SHORT = "short";
@@ -110,13 +111,24 @@
      * Information.TOOLTIP, Information.DEFAULT
      */
     public String getDescription(Object kind) {
-        String result = (String) getItem("description-" + kind);
+        String result = getDescriptionStrict(kind);
         if (result == null)
             return (String) getItem("description-" + DEFAULT);
         else
             return result;
     }
 
+      /**
+     * Returns the application's description of the specified type.
+     *
+     * @param kind one of Information.SHORT, Information.ONE_LINE,
+     * Information.TOOLTIP, Information.DEFAULT
+     */
+    public String getDescriptionStrict(Object kind) {
+        return (String) getItem("description-" + kind);
+        
+    }
+
     /**
      * Returns the icons specified by the JNLP file.
      *
diff -r 01544fb82384 netx/net/sourceforge/jnlp/JNLPSplashScreen.java
--- a/netx/net/sourceforge/jnlp/JNLPSplashScreen.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/JNLPSplashScreen.java	Wed Aug 01 13:40:20 2012 +0200
@@ -1,5 +1,43 @@
+/* JNLPSplashScreen.java
+   Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
 package net.sourceforge.jnlp;
 
+import java.awt.BorderLayout;
 import java.awt.Dimension;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
@@ -15,19 +53,23 @@
 import net.sourceforge.jnlp.cache.ResourceTracker;
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
 import net.sourceforge.jnlp.util.ImageResources;
+import net.sourceforge.jnlp.splashscreen.SplashPanel;
+import net.sourceforge.jnlp.splashscreen.SplashUtils;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
 
 public class JNLPSplashScreen extends JDialog {
 
-    String applicationTitle;
-    String applicationVendor;
 
     ResourceTracker resourceTracker;
 
     URL splashImageUrl;
     Image splashImage;
+    private final JNLPFile file;
+    public static final  int DEF_WIDTH=635;
+    public static final  int DEF_HEIGHT=480;
+    private SplashPanel componetSplash;
 
-    public JNLPSplashScreen(ResourceTracker resourceTracker,
-            String applicationTitle, String applicationVendor) {
+    public JNLPSplashScreen(ResourceTracker resourceTracker, final JNLPFile file) {
 
         setIconImages(ImageResources.INSTANCE.getApplicationImages());
 
@@ -36,61 +78,82 @@
         // JNLP file.
 
         this.resourceTracker = resourceTracker;
-        this.applicationTitle = applicationTitle;
-        this.applicationVendor = applicationVendor;
+        this.file=file;
 
     }
 
     public void setSplashImageURL(URL url) {
-        splashImageUrl = url;
-        splashImage = null;
-        try {
-            splashImage = ImageIO.read(resourceTracker
-                    .getCacheFile(splashImageUrl));
-            if (splashImage == null) {
+        if (url != null) {
+            splashImageUrl = url;
+            splashImage = null;
+            try {
+                splashImage = ImageIO.read(resourceTracker.getCacheFile(splashImageUrl));
+                if (splashImage == null) {
+                    if (JNLPRuntime.isDebug()) {
+                        System.err.println("Error loading splash image: " + url);
+                    }
+
+                }
+            } catch (IOException e) {
                 if (JNLPRuntime.isDebug()) {
                     System.err.println("Error loading splash image: " + url);
                 }
-                return;
+                splashImage = null;
+
+            } catch (IllegalArgumentException argumentException) {
+                if (JNLPRuntime.isDebug()) {
+                    System.err.println("Error loading splash image: " + url);
+                }
+                splashImage = null;
+
             }
-        } catch (IOException e) {
-            if (JNLPRuntime.isDebug()) {
-                System.err.println("Error loading splash image: " + url);
-            }
-            splashImage = null;
-            return;
-        } catch (IllegalArgumentException argumentException) {
-            if (JNLPRuntime.isDebug()) {
-                System.err.println("Error loading splash image: " + url);
-            }
-            splashImage = null;
-            return;
         }
 
+        if (splashImage == null) {
+            this.setLayout(new BorderLayout());
+            SplashPanel splash = SplashUtils.getSplashScreen(DEF_WIDTH, DEF_HEIGHT);
+            if (splash != null) {
+                splash.startAnimation();
+                splash.setInformationElement(InformationElement.createFromJNLP(file));
+                this.add(splash.getSplashComponent());
+                this.componetSplash = splash;
+            }
+        }
         correctSize();
     }
 
     public boolean isSplashScreenValid() {
-        return (splashImage != null);
+        return (splashImage != null) || (componetSplash != null);
+
     }
 
     private void correctSize() {
+        int minimumWidth = DEF_WIDTH;
+        int minimumHeight = DEF_HEIGHT;
+        if (splashImage != null) {
+            Insets insets = getInsets();
+            minimumWidth = splashImage.getWidth(null) + insets.left
+                    + insets.right;
+            minimumHeight = splashImage.getHeight(null) + insets.top
+                    + insets.bottom;
+        }
+        setMinimumSize(new Dimension(0, 0));
+        setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
+        setSize(new Dimension(minimumWidth, minimumHeight));
+        setPreferredSize(new Dimension(minimumWidth, minimumHeight));
 
-        Insets insets = getInsets();
-        int minimumWidth = splashImage.getWidth(null) + insets.left
-                + insets.right;
-        int minimumHeight = splashImage.getHeight(null) + insets.top
-                + insets.bottom;
-        setMinimumSize(new Dimension(minimumWidth, minimumHeight));
-
-        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-        setLocation((screenSize.width - minimumWidth) / 2,
-                (screenSize.height - minimumHeight) / 2);
+        // Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+        // setLocation((screenSize.width - minimumWidth) / 2,
+        // (screenSize.height - minimumHeight) / 2);
+        //Above works always, but center only to middle of all monitors
+        //below works on 1.4 and higher, and center to middle of primary monmtor
+        setLocationRelativeTo(null);
     }
 
     @Override
     public void paint(Graphics g) {
         if (splashImage == null) {
+            super.paint(g);
             return;
         }
 
@@ -99,4 +162,12 @@
         g2.drawImage(splashImage, getInsets().left, getInsets().top, null);
 
     }
+
+    boolean isCustomSplashscreen() {
+       return (componetSplash!=null);
+    }
+
+    void stopAnimation() {
+        if (isCustomSplashscreen()) componetSplash.stopAnimation();
+    }
 }
diff -r 01544fb82384 netx/net/sourceforge/jnlp/Launcher.java
--- a/netx/net/sourceforge/jnlp/Launcher.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/Launcher.java	Wed Aug 01 13:40:20 2012 +0200
@@ -20,6 +20,7 @@
 
 import java.applet.Applet;
 import java.awt.Container;
+import java.awt.SplashScreen;
 import java.io.File;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
@@ -42,6 +43,8 @@
 
 import javax.swing.SwingUtilities;
 import javax.swing.text.html.parser.ParserDelegator;
+import net.sourceforge.jnlp.runtime.AppletEnvironment;
+import net.sourceforge.jnlp.splashscreen.SplashUtils;
 
 import sun.awt.SunToolkit;
 
@@ -540,6 +543,12 @@
             }
 
             if (JNLPRuntime.getForksAllowed() && file.needsNewVM()) {
+                if (!JNLPRuntime.isHeadless()){
+                    SplashScreen sp = SplashScreen.getSplashScreen();
+                    if (sp!=null) {
+                        sp.close();
+                    }
+                }
                 List<String> netxArguments = new LinkedList<String>();
                 netxArguments.add("-Xnofork");
                 netxArguments.addAll(JNLPRuntime.getInitialArguments());
@@ -649,18 +658,22 @@
      * @param enableCodeBase whether to add the codebase URL to the classloader
      */
     protected ApplicationInstance launchApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException {
-        if (!file.isApplet())
+        if (!file.isApplet()) {
             throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo")));
+        }
 
+        AppletInstance applet = null;
         try {
-            AppletInstance applet = createApplet(file, enableCodeBase, cont);
+            applet = createApplet(file, enableCodeBase, cont);
             applet.initialize();
 
             applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance
             return applet;
         } catch (LaunchException lex) {
+            SplashUtils.showErrorCaught(lex, applet);
             throw launchError(lex);
         } catch (Exception ex) {
+            SplashUtils.showErrorCaught(ex, applet);
             throw launchError(new LaunchException(file, ex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LCouldNotLaunchInfo")));
         }
     }
@@ -669,16 +682,19 @@
      * Gets an ApplicationInstance, but does not launch the applet.
      */
     protected ApplicationInstance getApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException {
-        if (!file.isApplet())
+        if (!file.isApplet()) {
             throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo")));
-
+        }
+        AppletInstance applet = null;
         try {
-            AppletInstance applet = createApplet(file, enableCodeBase, cont);
+            applet = createApplet(file, enableCodeBase, cont);
             applet.initialize();
             return applet;
         } catch (LaunchException lex) {
+            SplashUtils.showErrorCaught(lex, applet);
             throw launchError(lex);
         } catch (Exception ex) {
+            SplashUtils.showErrorCaught(ex, applet);
             throw launchError(new LaunchException(file, ex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LCouldNotLaunchInfo")));
         }
     }
@@ -696,22 +712,30 @@
      *
      * @param enableCodeBase whether to add the code base URL to the classloader
      */
-    protected AppletInstance createApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException {
+    protected  synchronized  AppletInstance createApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException {
+            // appletInstance is needed by ServiceManager when looking up
+            // services. This could potentially be done in applet constructor
+            // so initialize appletInstance before creating applet.
+        AppletInstance appletInstance = null;
+        ThreadGroup group = Thread.currentThread().getThreadGroup();
         try {
             JNLPClassLoader loader = JNLPClassLoader.getInstance(file, updatePolicy);
 
             if (enableCodeBase) {
                 loader.enableCodeBase();
             } else if (file.getResources().getJARs().length == 0) {
-                throw new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later");
+                Exception ex = new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later");
+                try {
+                    SplashUtils.showError(ex, new AppletEnvironment(file, new AppletInstance(file, group, new ClassLoader() {
+                    }, null)));
+                } catch (Exception exx) {
+                    if (JNLPRuntime.isDebug()) {
+                        exx.printStackTrace();
+                    }
+                }
+                throw ex;
             }
 
-            ThreadGroup group = Thread.currentThread().getThreadGroup();
-
-            // appletInstance is needed by ServiceManager when looking up 
-            // services. This could potentially be done in applet constructor
-            // so initialize appletInstance before creating applet.
-            AppletInstance appletInstance;
             if (cont == null)
                 appletInstance = new AppletInstance(file, group, loader, null);
             else
@@ -732,6 +756,7 @@
 
             return appletInstance;
         } catch (Exception ex) {
+            SplashUtils.showErrorCaught(ex, appletInstance);
             throw launchError(new LaunchException(file, ex, R("LSFatal"), R("LCInit"), R("LInitApplet"), R("LInitAppletInfo")));
         }
     }
@@ -842,7 +867,7 @@
         new ParserDelegator();
     }
 
-    /**
+       /**
      * This runnable is used to call the appropriate launch method
      * for the application, applet, or installer in its thread group.
      */
diff -r 01544fb82384 netx/net/sourceforge/jnlp/NetxPanel.java
--- a/netx/net/sourceforge/jnlp/NetxPanel.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/NetxPanel.java	Wed Aug 01 13:40:20 2012 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007 Red Hat, Inc.
+ * Copyright 2012 Red Hat, Inc.
  * This file is part of IcedTea, http://icedtea.classpath.org
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -22,7 +22,6 @@
 
 package net.sourceforge.jnlp;
 
-import net.sourceforge.jnlp.AppletLog;
 import net.sourceforge.jnlp.runtime.AppletInstance;
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
 
@@ -32,6 +31,8 @@
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+import net.sourceforge.jnlp.splashscreen.SplashController;
+import net.sourceforge.jnlp.splashscreen.SplashPanel;
 
 import sun.applet.AppletViewerPanel;
 import sun.awt.SunToolkit;
@@ -42,10 +43,11 @@
  *
  * @author      Francis Kung <fkung at redhat.com>
  */
-public class NetxPanel extends AppletViewerPanel {
+public class NetxPanel extends AppletViewerPanel implements SplashController {
     private PluginBridge bridge = null;
     private boolean exitOnFailure = true;
     private AppletInstance appInst = null;
+    private SplashController appletViewerFrame;
     private boolean appletAlive;
     private final String uKey;
 
@@ -232,4 +234,32 @@
             SunToolkit.createNewAppContext();
         }
     }
+
+    
+   
+
+    public void setAppletViewerFrame(SplashController framePanel) {
+        appletViewerFrame=framePanel;
+    }
+
+    @Override
+    public void removeSplash() {
+        appletViewerFrame.removeSplash();
+    }
+
+    @Override
+    public void replaceSplash(SplashPanel r) {
+        appletViewerFrame.replaceSplash(r);
+    }
+
+    @Override
+    public int getSplashWidth() {
+        return appletViewerFrame.getSplashWidth();
+    }
+
+    @Override
+    public int getSplashHeigth() {
+        return appletViewerFrame.getSplashHeigth();
+    }
+
 }
diff -r 01544fb82384 netx/net/sourceforge/jnlp/resources/Messages.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties	Wed Aug 01 13:40:20 2012 +0200
@@ -438,3 +438,28 @@
 CLInfoDescription=Shows more information about the given property
 CLCheckDescription=Shows any properties that have been defined but are not recognized by IcedTea Web
 CLHelpDescription=The itweb-settings tool allows a user to modify, view and check configuration. \nTo use the GUI, do not pass any arguments. To use the CLI mode, pass in the approrpiate command and parameters. For help with a particular command, try: {0} command help
+
+#  splash screen related
+SPLASHerror = Click here for details. Serious exception occcured.
+SPLASH_ERROR = ERROR
+SPLASHtitle = Title
+SPLASHvendor = Vendor
+SPLASHhomepage = Homepage
+SPLASHdescription = Description
+SPLASHClose= Close
+SPLASHclosewAndCopyException = Close and copy StackTrace to clipboard
+SPLASHexOccured = Sorry, an serious exception have occured...
+SPLASHHome = Home
+SPLASHcantCopyEx = Can not copy exception
+SPLASHnoExRecorded = No exception recorded
+SPLASHmainL1 = For even more  inforamtion you can visit
+SPLASHurl = http://icedtea.classpath.org/wiki/IcedTea-Web#Filing_bugs
+SPLASHurlLooks = http://icedtea.classpath.org/wiki/IcedTea-Web
+SPLASHmainL2 = and follow the steps to obtain information and fill bug
+SPLASHmainL3 = Sorry no more informations avaiable, try to launch browser from commandline and watch output.
+SPLASHcloseAndCopyShorter = Close and copy to clipboard
+SPLASHmainL4 = We have noticed exception written below, for even more information try to launch browser from commandline and watch output
+SPLASHexWas = Exception was:
+SPLASHcfl = Can't follow link to
+SPLASHvendorsInfo = Information from vendor of your application
+SPLASHanotherInfo = Another avaiable info
\ No newline at end of file
diff -r 01544fb82384 netx/net/sourceforge/jnlp/runtime/Boot.java
--- a/netx/net/sourceforge/jnlp/runtime/Boot.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/Boot.java	Wed Aug 01 13:40:20 2012 +0200
@@ -53,8 +53,8 @@
     // todo: decide whether a spawned netx (external launch)
     // should inherit the same options as this instance (store argv?)
 
-    private static final String name = Boot.class.getPackage().getImplementationTitle();
-    private static final String version = Boot.class.getPackage().getImplementationVersion();
+    public static final String name = Boot.class.getPackage().getImplementationTitle();
+    public static final String version = Boot.class.getPackage().getImplementationVersion();
 
     /** the text to display before launching the about link */
     private static final String aboutMessage = ""
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/SplashController.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashController.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,48 @@
+/* SplashController.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+public interface SplashController {
+
+    public void removeSplash();
+
+    public void replaceSplash(SplashPanel r);
+
+    public int getSplashWidth();
+
+    public int getSplashHeigth();
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/SplashErrorPanel.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashErrorPanel.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,47 @@
+/* SplashErrorPanel.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+public interface SplashErrorPanel extends SplashPanel {
+
+    /**
+     * When applet loading fails, then dying stacktrace can be set, and is then shown to user on demand.
+     */
+    public Throwable getLoadingException();
+
+    public void setLoadingException(Throwable loadingException);
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/SplashPanel.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashPanel.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,124 @@
+/* SplashPanel.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import java.awt.Graphics;
+import java.awt.event.ComponentListener;
+
+import javax.swing.JComponent;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
+
+public interface SplashPanel {
+
+    /**
+     * The plugin splashscreens must be placed into another containers,
+     * So must return themselves as JComponent.
+     * Mostly your SplashScreen will extend some JComponent, so this method will
+     * just return "this"
+     */
+    public JComponent getSplashComponent();
+
+    /**
+     * javaws should provide content of <information> tag. Those informations hould be passed by this method
+     */
+    public void setInformationElement(InformationElement content);
+
+    public InformationElement getInformationContent();
+
+    /** Width of the plugin window */
+    public void setPluginWidth(int pluginWidth);
+
+    /** Height of the plugin window */
+    public void setPluginHeight(int pluginHeight);
+
+    /** Width of the plugin window */
+    public int getPluginWidth();
+
+    /** Height of the plugin window */
+    public int getPluginHeight();
+
+    public void adjustForSize();
+
+    // Add a new listener for resizes
+    public void addComponentListener(ComponentListener cl);
+
+    public boolean isAnimationRunning();
+
+    /**
+     * Methods to start the animation in the splash panel.
+     *
+     * This method exits after starting a new thread to do the animation. It
+     * is synchronized to prevent multiple startAnimation threads from being created.
+     */
+    public void startAnimation();
+
+    /**
+     * Stops the animation
+     */
+    public void stopAnimation();
+
+    public void paint(Graphics g);
+
+    /**
+     * Decide wather to show icedtea-web plugin or just icedtea-web
+     * @param splashReason
+     */
+    public void setSplashReason(SplashReason splashReason);
+
+    SplashReason getSplashReason();
+
+    /**
+     * Version can be printed in splash window
+     * @param version
+     */
+    public void setVersion(String version);
+
+    String getVersion();
+
+    /**
+     * how mny percentage loaded  is shown in progress bar (if any)
+     * @param done
+     */
+    public void setPercentage(int done);
+
+    /**
+     * returns state of loading progress bar
+     * @return
+     */
+    public int getPercentage();
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/SplashUtils.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashUtils.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,219 @@
+/* SplashUtils.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import net.sourceforge.jnlp.JNLPSplashScreen;
+import net.sourceforge.jnlp.runtime.AppletEnvironment;
+import net.sourceforge.jnlp.runtime.AppletInstance;
+import net.sourceforge.jnlp.runtime.Boot;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
+import net.sourceforge.jnlp.splashscreen.impls.*;
+
+public class SplashUtils {
+
+    static final String ICEDTEA_WEB_PLUGIN_SPLASH = "ICEDTEA_WEB_PLUGIN_SPLASH";
+    static final String ICEDTEA_WEB_SPLASH = "ICEDTEA_WEB_SPLASH";
+    static final String NONE = "none";
+    static final String DEFAULT = "default";
+
+    public static enum SplashReason {
+
+        APPLET, JAVAWS;
+
+        @Override
+        public String toString() {
+            switch (this) {
+                case APPLET:
+                    return "IcedTea-Web Plugin";
+                case JAVAWS:
+                    return "IcedTea-Web";
+            }
+            return "unknown";
+        }
+    }
+
+    public static void showErrorCaught(Throwable ex, AppletInstance appletInstance) {
+        try {
+            showError(ex, appletInstance);
+        } catch (Throwable t) {
+            if (JNLPRuntime.isDebug()) {
+                // prinitng this exception is discutable. I have let it in for case that
+                //some retyping will fail
+                t.printStackTrace();
+            }
+        }
+    }
+
+    public static void showError(Throwable ex, AppletInstance appletInstance) {
+        if (appletInstance == null) {
+            return;
+        }
+        AppletEnvironment ae = appletInstance.getAppletEnvironment();
+        showError(ex, ae);
+    }
+
+    public static void showError(Throwable ex, AppletEnvironment ae) {
+        if (ae == null) {
+            return;
+        }
+        SplashController p = ((SplashController) (ae.getAppletFrame()));
+        showError(ex, p);
+    }
+
+    public static void showError(Throwable ex, SplashController f) {
+        if (f == null) {
+            return;
+        }
+
+        f.replaceSplash(getErrorSplashScreen(f.getSplashWidth(), f.getSplashHeigth(), ex));
+    }
+
+    
+    private static SplashReason getReason() {
+        if (JNLPRuntime.isWebstartApplication()){
+            return SplashReason.JAVAWS;
+        }else{
+            return SplashReason.APPLET;
+        }
+        
+    }
+    
+
+    /**
+     * Warrning - splash should have recieve width and height without borders.
+     * plugin's window have NO border, but javaws window HAVE border. This msut be calcualted prior calling this method
+     * @param width
+     * @param height
+     * @return
+     */
+    public static SplashPanel getSplashScreen(int width, int height) {
+        return getSplashScreen(width, height, getReason());
+    }
+
+    /**
+     * Warrning - splash should have recieve width and height without borders.
+     * plugin's window have NO border, but javaws window HAVE border. This msut be calcualted prior calling this method
+     * @param width
+     * @param height
+     * @param  ex - exception to be shown if any
+     * @return
+     */
+    public static SplashErrorPanel getErrorSplashScreen(int width, int height, Throwable ex) {
+        return getErrorSplashScreen(width, height, getReason(), ex);
+    }
+
+    /**
+     * Warrning - splash should have recieve width and height without borders.
+     * plugin's window have NO border, but javaws window HAVE border. This msut be calcualted prior calling this method
+     * @param width
+     * @param height
+     * @param splashReason
+     * @return
+     */
+    static SplashPanel getSplashScreen(int width, int height, SplashUtils.SplashReason splashReason) {
+        return getSplashScreen(width, height, splashReason, null, false);
+    }
+
+    /**
+     * Warrning - splash should have recieve width and height without borders.
+     * plugin's window have NO border, but javaws window HAVE border. This msut be calcualted prior calling this method
+     * @param width
+     * @param height
+     * @param splashReason
+     * @return
+     */
+    static SplashErrorPanel getErrorSplashScreen(int width, int height, SplashUtils.SplashReason splashReason, Throwable ex) {
+        return (SplashErrorPanel) getSplashScreen(width, height, splashReason, ex, true);
+    }
+
+    static SplashPanel getSplashScreen(int width, int height, SplashUtils.SplashReason splashReason, Throwable loadingException, boolean isError) {
+        String splashEnvironmetVar = null;
+        String pluginSplashEnvironmetVar = null;
+        try {
+            pluginSplashEnvironmetVar = System.getenv(ICEDTEA_WEB_PLUGIN_SPLASH);
+            splashEnvironmetVar = System.getenv(ICEDTEA_WEB_SPLASH);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        SplashPanel sp = null;
+        if (SplashReason.JAVAWS.equals(splashReason)) {
+            if (NONE.equals(splashEnvironmetVar)) {
+                return null;
+            }
+//            if ("circle".equals(splashEnvironmetVar)) {
+//                sp = new CircleSplashScreen(width, height, splashReason);
+//            }
+//            if ("dummy".equals(splashEnvironmetVar)) {
+//                sp = new DummySplashScreen(width, height, splashReason);
+//            }
+            if (DEFAULT.equals(splashEnvironmetVar)) {
+                if (isError) {
+                    sp = new DefaultErrorSplashScreen2012(width, height, splashReason, loadingException);
+                } else {
+                    sp = new DefaultSplashScreen2012(width, height, splashReason);
+                }
+            }
+        }
+        if (SplashReason.APPLET.equals(splashReason)) {
+            if (NONE.equals(pluginSplashEnvironmetVar)) {
+                return null;
+            }
+//            if ("circle".equals(pluginSplashEnvironmetVar)) {
+//                sp = new CircleSplashScreen(width, height, splashReason);
+//            }
+//            if ("dummy".equals(pluginSplashEnvironmetVar)) {
+//                sp = new DummySplashScreen(width, height, splashReason);
+//            }
+            if (DEFAULT.equals(pluginSplashEnvironmetVar)) {
+                if (isError) {
+                    sp = new DefaultErrorSplashScreen2012(width, height, splashReason, loadingException);
+                } else {
+                    sp = new DefaultSplashScreen2012(width, height, splashReason);
+                }
+            }
+        }
+        //if (sp==null)  sp=new DummySplashScreen(width, height,splashReason);
+        //if (sp==null)  sp=new CircleSplashScreen(width, height,splashReason);
+        if (isError) {
+            sp = new DefaultErrorSplashScreen2012(width, height, splashReason, loadingException);
+        } else {
+            sp = new DefaultSplashScreen2012(width, height, splashReason);
+        }
+        sp.setVersion(Boot.version);
+        return sp;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSplashScreen2012.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSplashScreen2012.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,118 @@
+/* DefaultErrorSplashScreen12.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls;
+
+import java.awt.Graphics;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.ErrorPainter;
+import net.sourceforge.jnlp.splashscreen.parts.BasicComponentErrorSplashScreen;
+
+public final class DefaultErrorSplashScreen2012 extends BasicComponentErrorSplashScreen {
+
+    private final DefaultErrorSplashScreen2012 self;
+    private final ErrorPainter painter;
+    private final DefaultSplashScreens2012Commons commons;
+
+    public DefaultErrorSplashScreen2012(int width, int height, SplashReason splashReason, Throwable ex) {
+        //setting width and height now is causing  unnecessary blinking
+        //setPluginHeight(height);
+        //setPluginWidth(width);
+        //to have this in inner classes
+        self = this;
+        setLoadingException(ex);
+        setSplashReason(splashReason);
+        painter = new ErrorPainter(self, true);
+        addMouseListener(new MouseAdapter() {
+
+            @Override
+            public void mouseClicked(MouseEvent e) {
+                if (((ErrorPainter) painter).getErrorCorner() != null
+                        && e.getX() > ((ErrorPainter) painter).getErrorCorner().x
+                        && e.getY() > ((ErrorPainter) painter).getErrorCorner().y) {
+                    raiseExceptionDialog();
+                }
+            }
+        });
+        commons = new DefaultSplashScreens2012Commons(painter, self);
+    }
+
+    @Override
+    public void paintComponent(Graphics g) {
+        paint(g);
+    }
+
+    @Override
+    public void paint(Graphics g) {
+        commons.paint(g);
+
+
+    }
+
+    @Override
+    public void adjustForSize() {
+        commons.adjustForSize();
+    }
+
+    @Override
+    public void stopAnimation() {
+        commons.stopAnimation();
+    }
+
+    /**
+     * Methods to start the animation in the splash panel.
+     *
+     * This method exits after starting a new thread to do the animation. It
+     * is synchronized to prevent multiple startAnimation threads from being created.
+     */
+    @Override
+    public void startAnimation() {
+        commons.startAnimation();
+    }
+
+    @Override
+    public void setPercentage(int done) {
+       commons.setPercentage(done);
+    }
+
+    @Override
+    public int getPercentage() {
+        return commons.getPercentage();
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreen2012.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreen2012.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,105 @@
+/* DefaultSplashScreen12.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls;
+
+import java.awt.Graphics;
+
+
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.BasePainter;
+import net.sourceforge.jnlp.splashscreen.parts.BasicComponentSplashScreen;
+
+public final class DefaultSplashScreen2012 extends BasicComponentSplashScreen {
+
+    private final DefaultSplashScreen2012 self;
+    private final BasePainter painter;
+    private final DefaultSplashScreens2012Commons commons;
+
+    public DefaultSplashScreen2012(int width, int height, SplashReason splashReason) {
+        //setting width and height now is causing  unnecessary blinking
+        //setPluginHeight(height);
+        //setPluginWidth(width);
+        //to have this in inner classes
+        self = this;
+        setSplashReason(splashReason);
+        painter = new BasePainter(this);
+        commons = new DefaultSplashScreens2012Commons(painter, self);
+    }
+
+    @Override
+    public void paintComponent(Graphics g) {
+        paint(g);
+    }
+
+    @Override
+    public void paint(Graphics g) {
+        commons.paint(g);
+
+
+    }
+
+    @Override
+    public void adjustForSize() {
+        commons.adjustForSize();
+    }
+
+    @Override
+    public void stopAnimation() {
+        commons.stopAnimation();
+    }
+
+    /**
+     * Methods to start the animation in the splash panel.
+     *
+     * This method exits after starting a new thread to do the animation. It
+     * is synchronized to prevent multiple startAnimation threads from being created.
+     */
+    @Override
+    public void startAnimation() {
+        commons.startAnimation();
+    }
+
+    @Override
+    public void setPercentage(int done) {
+        commons.setPercentage(done);
+    }
+
+    @Override
+    public int getPercentage() {
+        return commons.getPercentage();
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,115 @@
+/* DefaultSplashScreensCommons2012.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls;
+
+import java.awt.Graphics;
+import java.awt.event.ComponentAdapter;
+import java.awt.event.ComponentEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.BasePainter;
+import net.sourceforge.jnlp.splashscreen.parts.BasicComponentSplashScreen;
+
+public final class DefaultSplashScreens2012Commons {
+
+    private final BasicComponentSplashScreen parent;
+    private final BasePainter painter;
+
+    public DefaultSplashScreens2012Commons(BasePainter painterr, BasicComponentSplashScreen parentt) {
+        this.painter = painterr;
+        this.parent = parentt;
+        parent.addMouseListener(new MouseAdapter() {
+
+            @Override
+            public void mouseClicked(MouseEvent e) {
+                painter.increaseAnimationPosition();
+                parent.repaint();
+            }
+        });
+        // Add a new listener for resizes
+        parent.addComponentListener(new ComponentAdapter() {
+            // Re-adjust variables based on size
+
+            @Override
+            public void componentResized(ComponentEvent e) {
+                parent.setPluginWidth(parent.getWidth());
+                parent.setPluginHeight(parent.getHeight());
+                parent.adjustForSize();
+                parent.repaint();
+            }
+        });
+    }
+
+    public void paint(Graphics g) {
+        painter.paint(g);
+
+
+    }
+
+    public void adjustForSize() {
+        painter.adjustForSize(parent.getPluginWidth(), parent.getPluginHeight());
+    }
+
+    public void stopAnimation() {
+        parent.setAnimationRunning(false);
+    }
+
+    /**
+     * Methods to start the animation in the splash panel.
+     *
+     * This method exits after starting a new thread to do the animation. It
+     * is synchronized to prevent multiple startAnimation threads from being created.
+     */
+    public void startAnimation() {
+        if (parent.isAnimationRunning()) {
+            return;
+        }
+        parent.setAnimationRunning(true);
+        painter.startAnimationThreads();
+
+    }
+
+    public void setPercentage(int done) {
+        painter.clearCachedWaterTextImage();
+        painter.setWaterLevel(done);
+    }
+
+    public int getPercentage() {
+        return painter.getWaterLevel();
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainter.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainter.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,508 @@
+/* BasePainter.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.*;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.Toolkit;
+import java.awt.font.TextAttribute;
+import java.awt.image.BufferedImage;
+import java.util.HashMap;
+import java.util.List;
+
+import java.util.Map;
+
+import javax.swing.SwingUtilities;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.parts.BasicComponentSplashScreen;
+import net.sourceforge.jnlp.splashscreen.parts.InfoItem;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
+
+public class BasePainter {
+
+    protected final BasicComponentSplashScreen master;
+    //animations
+    //waterLevel of water (0-100%)
+    private int waterLevel = 0;
+    //waving of water and position of shhadowed WEB
+    private int animationsPosition = 0;
+    private int greyTextIncrment = 15; //how quickly is greyed web moving
+    //colors
+    protected static final Color teaLiveColor = new Color(205, 1, 3);
+    protected static final Color backgroundLiveColor = Color.white;
+    protected static final Color teaLeafsStalksLiveColor = Color.black;
+    protected static final Color pluginLiveColor = Color.black;
+    protected static final Color waterLiveColor = new Color(80, 131, 160);
+    protected static final Color plainTextLiveColor = Color.black;
+    protected Color teaColor;
+    protected Color backgroundColor;
+    protected Color teaLeafsStalksColor;
+    protected Color pluginColor;
+    protected Color waterColor;
+    protected Color plainTextColor;
+    //BufferedImage tmpBackround; //testingBackground for fitting
+    protected BufferedImage prerenderedStuff;
+    private Font teaFont;
+    private Font icedFont;
+    private Font webFont;
+    private Font pluginFont;
+    private Font plainTextsFont;
+    private Font alternativeTextFont;
+    //those spaces are meaningful for centering the text.. thats why alternative;)
+    private static final String alternativeICED = "Iced    ";
+    private static final String alternativeWeb = "Web  ";
+    private static final String alternativeTtea = "    Tea";
+    private static final String alternativePlugin = "plugin ";
+    private static final String ICED = "Iced";
+    private static final String web = "web";
+    private static final String tea = "Tea";
+    private static final String plugin = "plugin  ";
+    //inidivdual sizes, all converging to ZERO!!
+    private final int WEB_TOP_ALIGMENT = 324;
+    private final int WEB_LEFT_ALIGMENT = 84;
+    //enabling
+    protected boolean showNiceTexts = true;
+    private boolean showLeaf = true;
+    private boolean showInfo = true;
+    protected TextWithWaterLevel twl;
+    protected TextWithWaterLevel oldTwl;
+    protected boolean canWave = true;
+
+    protected void paintNiceTexts(Graphics2D g2d) {
+        //the only animated stuff
+        oldTwl = twl;
+        twl = new TextWithWaterLevel(ICED, icedFont);
+        if (oldTwl != null && !canWave) {
+            twl.setCachedPolygon(oldTwl.getCachedPolygon());
+        }
+        twl.setPercentageOfWater(waterLevel);
+        twl.setBgColor(backgroundColor);
+        twl.setWaterColor(waterColor);
+        twl.cutTo(g2d, scaleX(42), scaleY(278));
+        MovingText mt = new MovingText(web, webFont);
+        mt.setPercentageOfWater(animationsPosition);
+        mt.cutTo(g2d, scaleX(WEB_LEFT_ALIGMENT), scaleY(WEB_TOP_ALIGMENT));
+    }
+
+    protected void paintPlainTexts(Graphics2D g2d) {
+        g2d.setFont(alternativeTextFont);
+        g2d.setColor(waterColor);
+        drawTextAroundCenter(g2d, -0.6d, alternativeICED);
+        g2d.setColor(teaColor);
+        drawTextAroundCenter(g2d, -0.6d, alternativeTtea);
+        g2d.setColor(pluginColor);
+        String s = getAlternativeProduktName();
+        int sub = animationsPosition / greyTextIncrment;
+        sub = sub % s.length();
+        if (!master.isAnimationRunning()) {
+            sub = s.length();
+        }
+        drawTextAroundCenter(g2d, 0.3d, s.substring(0, sub));
+    }
+    //enabling end
+
+    private int scaleAvarage(double origValue) {
+        return (int) (avarageRatio() * origValue);
+    }
+
+    private int scaleMax(double origValue) {
+        return (int) (maxRatio() * origValue);
+    }
+
+    private int scaleMin(double origValue) {
+        return (int) (minRatio() * origValue);
+    }
+
+    private double avarageRatio() {
+        return (getRatioX() + getRatioY()) / 2d;
+    }
+
+    private double minRatio() {
+        return Math.min(getRatioX(), getRatioY());
+    }
+
+    private double maxRatio() {
+        return Math.max(getRatioX(), getRatioY());
+    }
+
+    private int scaleY(double origValue) {
+        return (int) scaleY(master.getPluginHeight(), origValue);
+    }
+
+    private int scaleX(double origValue) {
+        return (int) scaleX(master.getPluginWidth(), origValue);
+    }
+
+    private double getRatioY() {
+        return getRatio(DefaultSplashScreen2012.ORIGINAL_H, master.getPluginHeight());
+    }
+
+    private double getRatioX() {
+        return getRatio(DefaultSplashScreen2012.ORIGINAL_W, master.getPluginWidth());
+    }
+
+    private static double scaleY(double currentSize, double origValue) {
+        return scale(DefaultSplashScreen2012.ORIGINAL_H, currentSize, origValue);
+    }
+
+    private static double scaleX(double currentSize, double origValue) {
+        return scale(DefaultSplashScreen2012.ORIGINAL_W, currentSize, origValue);
+    }
+
+    private static double getRatioY(double currentSize) {
+        return getRatio(DefaultSplashScreen2012.ORIGINAL_H, currentSize);
+    }
+
+    private static double getRatioX(double currentSize) {
+        return getRatio(DefaultSplashScreen2012.ORIGINAL_W, currentSize);
+    }
+
+    public static double scale(double origSize, double currentSize, double origValue) {
+        return getRatio(origSize, currentSize) * origValue;
+    }
+
+    public static double getRatio(double origSize, double currentSize) {
+        return (currentSize / origSize);
+    }
+    //size is considered from 0-origsize as 0-1.
+
+    //scaling end
+    public BasePainter(BasicComponentSplashScreen master) {
+        this(master, false);
+    }
+
+    public BasePainter(BasicComponentSplashScreen master, boolean startAnimation) {
+        //to have this in inner classes
+        this.master = master;
+        setColors();
+        adjustForSize(master.getPluginWidth(), master.getPluginHeight());
+        if (startAnimation) {
+            startAnimationThreads();
+        }
+
+    }
+
+    public void increaseAnimationPosition() {
+        animationsPosition += greyTextIncrment;
+    }
+
+    protected void ensurePrerenderedStuff() {
+        if (this.prerenderedStuff == null) {
+            this.prerenderedStuff = prerenderStill();
+        }
+    }
+
+    public void paint(Graphics g) {
+        Graphics2D g2d = (Graphics2D) g;
+        ensurePrerenderedStuff();
+        if (prerenderedStuff != null) {
+            g2d.drawImage(prerenderedStuff, 0, 0, null);
+        }
+
+        if (showNiceTexts) {
+            paintNiceTexts(g2d);
+        } else {
+            paintPlainTexts(g2d);
+        }
+
+
+
+    }
+
+    public final void adjustForSize(int width, int height) {
+        prepareFonts(width, height);
+        //enablings depends on fonts
+        setEnablings(width, height, master.getVersion(), master.getInformationContent(), (Graphics2D) (master.getGraphics()));
+        prerenderedStuff = prerenderStill();
+    }
+
+    private void setEnablings(int w, int h, String version, InformationElement ic, Graphics2D g2d) {
+        showLeaf = true;
+        if (w > 0 && h > 0) {
+            //leaf stretch much better to wide then to high
+            if (h / w > 2 || w / h > 6) {
+                showLeaf = false;
+            }
+        }
+        showInfo = true;
+        if (version != null && g2d != null && ic != null && ic.getHeader() != null && ic.getHeader().size() > 0) {
+            String s = ic.getHeader().get(0);
+            FontMetrics fm = g2d.getFontMetrics(plainTextsFont);
+            int versionLength = fm.stringWidth(version);
+            int firsDescLineLengthg = fm.stringWidth(s);
+            if (firsDescLineLengthg > w - versionLength - 10) {
+                showInfo = false;
+            }
+        }
+        if (Math.min(h, w) < Toolkit.getDefaultToolkit().getScreenSize().getHeight() / 10) {
+            showNiceTexts = false;
+        } else {
+            showNiceTexts = true;
+        }
+    }
+
+    public final void startAnimationThreads() {
+        Thread tt = getMoovingTextThread();
+        tt.start();
+        Thread t = getWatterLevelThread();
+        t.start();
+    }
+
+    private void prepareFonts(int w, int h) {
+        master.setPluginHeight(h);
+        master.setPluginWidth(w);
+        Map<TextAttribute, Object> teaFontAttributes = new HashMap<TextAttribute, Object>();
+        teaFontAttributes.put(TextAttribute.SIZE, new Integer(scaleMin(84)));
+        teaFontAttributes.put(TextAttribute.WIDTH, new Double((0.95)));
+        teaFontAttributes.put(TextAttribute.FAMILY, "Serif");
+        teaFont = new Font(teaFontAttributes);
+        Map<TextAttribute, Object> icedFontAttributes = new HashMap<TextAttribute, Object>();
+        icedFontAttributes.put(TextAttribute.SIZE, new Integer(scaleMin(82)));
+        icedFontAttributes.put(TextAttribute.WIDTH, new Double((0.80)));
+        icedFontAttributes.put(TextAttribute.FAMILY, "Serif");
+        icedFont = new Font(icedFontAttributes);
+        Map<TextAttribute, Object> webFontAttributes = new HashMap<TextAttribute, Object>();
+        webFontAttributes.put(TextAttribute.SIZE, new Integer(scaleMin(41)));
+        webFontAttributes.put(TextAttribute.WIDTH, new Double((2)));
+        webFontAttributes.put(TextAttribute.FAMILY, "Serif");
+        webFont = new Font(webFontAttributes);
+        Map<TextAttribute, Object> pluginFontAttributes = new HashMap<TextAttribute, Object>();
+        pluginFontAttributes.put(TextAttribute.SIZE, new Integer(scaleMin(32)));
+        pluginFontAttributes.put(TextAttribute.WEIGHT, new Double((5d)));
+        pluginFontAttributes.put(TextAttribute.WIDTH, new Double((0.9)));
+        pluginFontAttributes.put(TextAttribute.FAMILY, "Serif");
+        pluginFont = new Font(pluginFontAttributes);
+        Map<TextAttribute, Object> plainFontAttributes = new HashMap<TextAttribute, Object>();
+        plainFontAttributes.put(TextAttribute.SIZE, new Integer(12));
+        plainFontAttributes.put(TextAttribute.FAMILY, "Monospaced");
+        plainTextsFont = new Font(plainFontAttributes);
+        Map<TextAttribute, Object> alternativeTextFontAttributes = new HashMap<TextAttribute, Object>();
+        alternativeTextFontAttributes.put(TextAttribute.SIZE, Math.min(w, h) / 5);
+        alternativeTextFontAttributes.put(TextAttribute.WIDTH, new Double((0.7)));
+        alternativeTextFontAttributes.put(TextAttribute.FAMILY, "Monospaced");
+        alternativeTextFont = new Font(alternativeTextFontAttributes);
+
+    }
+
+    private void setColors() {
+
+        teaColor = teaLiveColor;
+        backgroundColor = backgroundLiveColor;
+        teaLeafsStalksColor = teaLeafsStalksLiveColor;
+        pluginColor = pluginLiveColor;
+        waterColor = waterLiveColor;
+        plainTextColor = plainTextLiveColor;
+
+    }
+
+    protected BufferedImage prerenderStill() {
+        if (master.getPluginWidth() <= 0 || master.getPluginHeight() <= 0) {
+            return null;
+        }
+        BufferedImage bi = new BufferedImage(master.getPluginWidth(), master.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        paintStillTo(bi.createGraphics(), master.getInformationContent(), master.getVersion());
+        return bi;
+    }
+
+    protected void paintStillTo(Graphics2D g2d, InformationElement ic, String version) {
+        RenderingHints r = g2d.getRenderingHints();
+        drawBase(g2d, ic, version);
+        g2d.setRenderingHints(r);
+    }
+
+    protected void drawTextAroundCenter(Graphics2D g2d, double heightOffset, String msg) {
+
+        int y = (master.getPluginHeight() / 2) + (g2d.getFontMetrics().getHeight() / 2 + (int) (heightOffset * g2d.getFontMetrics().getHeight()));
+        int x = (master.getPluginWidth() / 2) - (g2d.getFontMetrics().stringWidth(msg) / 2);
+        g2d.drawString(msg, x, y);
+    }
+
+    private Thread getMoovingTextThread() {
+        Thread tt = new Thread() {
+
+            @Override
+            public void run() {
+                while (master.isAnimationRunning()) {
+                    try {
+                        SwingUtilities.invokeAndWait(new Runnable() {
+                            @Override
+                            public void run() {
+                                animationsPosition += greyTextIncrment;
+                                if (animationsPosition > 10000) {
+                                    animationsPosition = 1;
+                                }
+                                // Force repaint
+                                master.repaint();
+                            }
+                        });
+                        Thread.sleep(150);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        };
+        tt.setDaemon(true);
+        return tt;
+    }
+
+    private Thread getWatterLevelThread() {
+        // Create a new thread to increment spinFactor and repaint
+        Thread t = new Thread() {
+
+            @Override
+            public void run() {
+                while (master.isAnimationRunning()) {
+                    if (waterLevel > 120) {
+                        break;
+                    }
+                    try {
+                        SwingUtilities.invokeAndWait(new Runnable() {
+
+                            @Override
+                            public void run() {
+                                waterLevel += 2;
+                                master.repaint();
+                            }
+                        });
+                        Thread.sleep((waterLevel / 4) * 30);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        };
+        t.setDaemon(true);
+        return t;
+    }
+
+    private String getAlternativeProduktName() {
+        if (SplashReason.JAVAWS.equals(master.getSplashReason())) {
+            return alternativeWeb;
+        } else if (SplashReason.APPLET.equals(master.getSplashReason())) {
+            return alternativeWeb + alternativePlugin;
+        } else {
+            return "....";
+        }
+    }
+
+    protected FontMetrics drawBase(Graphics2D g2d, InformationElement ic, String version) {
+        g2d.setColor(backgroundColor);
+        g2d.fillRect(0, 0, master.getPluginWidth() + 5, master.getPluginHeight() + 5);
+        if (showNiceTexts) {
+            //g2d.drawImage(tmpBackround, 0, 0, null);
+            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+            g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+            g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+            g2d.setFont(teaFont);
+            g2d.setColor(teaColor);
+            g2d.drawString(tea, scaleX(42) + g2d.getFontMetrics(icedFont).stringWidth(ICED), scaleY(278));
+            g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
+            if (showLeaf) {
+                g2d.fillPolygon(SplinesDefs.getMainLeafCurve(getRatioX(), getRatioY()));
+            }
+            if (showLeaf) {
+                g2d.fillPolygon(SplinesDefs.getSecondLeafCurve(getRatioX(), getRatioY()));
+            }
+            g2d.setColor(teaLeafsStalksColor);
+            if (showLeaf) {
+                g2d.fillPolygon(SplinesDefs.getMainLeafStalkCurve(getRatioX(), getRatioY()));
+            }
+            if (showLeaf) {
+                g2d.fillPolygon(SplinesDefs.getSecondLeafStalkCurve(getRatioX(), getRatioY()));
+            }
+            g2d.setFont(pluginFont);
+            g2d.setColor(pluginColor);
+            if (SplashReason.APPLET.equals(master.getSplashReason())) {
+                if (showLeaf) {
+                    g2d.drawString(plugin, scaleX(404), scaleY(145));
+                } else {
+                    FontMetrics wfm = g2d.getFontMetrics(webFont);
+                    g2d.drawString(plugin, wfm.stringWidth(web) + scaleX(WEB_LEFT_ALIGMENT) + 10, scaleY(WEB_TOP_ALIGMENT));
+                }
+            }
+            g2d.setFont(plainTextsFont);
+            g2d.setColor(plainTextColor);
+            FontMetrics fm = g2d.getFontMetrics();
+            if (ic != null) {
+                InfoItem des = ic.getBestMatchingDescriptionForSplash();
+                List<String> head = ic.getHeader();
+                if (head != null && showInfo) {
+                    for (int i = 0; i < head.size(); i++) {
+                        String string = head.get(i);
+                        g2d.drawString(string, 5, (i + 1) * fm.getHeight());
+                    }
+                }
+                if (des != null && des.getValue() != null) {
+                    g2d.drawString(des.getValue(), 5, master.getPluginHeight() - fm.getHeight());
+                }
+            }
+        }
+        g2d.setFont(plainTextsFont);
+        g2d.setColor(plainTextColor);
+        FontMetrics fm = g2d.getFontMetrics();
+        if (version != null) {
+            int y = master.getPluginWidth() - fm.stringWidth(version + " ");
+            if (y < 0) {
+                y = 0;
+            }
+            g2d.drawString(version, y, fm.getHeight());
+        }
+        return fm;
+    }
+
+    public int getWaterLevel() {
+        return waterLevel;
+    }
+
+    public void setWaterLevel(int level) {
+        this.waterLevel = level;
+    }
+
+    public int getAnimationsPosition() {
+        return animationsPosition;
+    }
+
+    public void clearCachedWaterTextImage() {
+        oldTwl = null;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurve.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurve.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,184 @@
+/* ControlCurve.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+/** This class represents a curve defined by a sequence of control points */
+/*  Part of NatCubic implementation, inspire by http://www.cse.unsw.edu.au/~lambert/*/
+import java.awt.*;
+
+public class ControlCurve {
+
+    protected Polygon pts;
+    protected Polygon result;
+    protected boolean withPoints = true;
+    protected int selection = -1;
+
+    public ControlCurve() {
+        pts = new Polygon();
+    }
+
+    public ControlCurve(Polygon p) {
+        pts = p;
+    }
+
+    public Polygon getSourcePolygon() {
+        return pts;
+    }
+
+    public void setSourcePolygon(Polygon pts) {
+        this.pts = pts;
+    }
+    static Font f = new Font("Courier", Font.PLAIN, 12);
+
+    /**
+     * to be overwriten
+     */
+    public Polygon calcualteResult() {
+        return null;
+    }
+
+    public void calcualteAndSaveResult() {
+        result = calcualteResult();
+    }
+
+    /** paint this curve into g.*/
+    public void paint(Graphics g) {
+        if (isWithPoints()) {
+            FontMetrics fm = g.getFontMetrics(f);
+            g.setFont(f);
+            int h = fm.getAscent() / 2;
+
+            for (int i = 0; i < pts.npoints; i++) {
+                String s = Integer.toString(i);
+                int w = fm.stringWidth(s) / 2;
+                g.drawString(Integer.toString(i), pts.xpoints[i] - w, pts.ypoints[i] + h);
+            }
+        }
+    }
+    static final int EPSILON = 36;  /* square of distance for picking */
+
+
+    /** return index of control point near to (x,y) or -1 if nothing near */
+    public int selectPoint(int x, int y) {
+        int mind = Integer.MAX_VALUE;
+        selection = -1;
+        for (int i = 0; i < pts.npoints; i++) {
+            int d = sqr(pts.xpoints[i] - x) + sqr(pts.ypoints[i] - y);
+            if (d < mind && d < EPSILON) {
+                mind = d;
+                selection = i;
+            }
+        }
+        return selection;
+    }
+
+    // square of an int
+    static int sqr(int x) {
+        return x * x;
+    }
+
+    public Polygon getResult() {
+        return result;
+    }
+
+    public void resetResult() {
+        this.result = null;
+    }
+
+    /** add a control point, return index of new control point */
+    public int addPoint(int x, int y) {
+        pts.addPoint(x, y);
+        resetResult();
+        return selection = pts.npoints - 1;
+    }
+
+    /** set selected control point */
+    public void setPoint(int x, int y) {
+        setPoint(selection, x, y);
+    }
+
+    /** set selected control point */
+    public void setPoint(int index, int x, int y) {
+        if (index >= 0 && index < pts.npoints) {
+            pts.xpoints[index] = x;
+            pts.ypoints[index] = y;
+            resetResult();
+        }
+    }
+
+    /** remove selected control point */
+    public void removePoint(int index) {
+        if (index >= 0 && index < pts.npoints) {
+            pts.npoints--;
+            for (int i = index; i < pts.npoints; i++) {
+                pts.xpoints[i] = pts.xpoints[i + 1];
+                pts.ypoints[i] = pts.ypoints[i + 1];
+            }
+            resetResult();
+        }
+    }
+
+    /** remove selected control point */
+    public void removePoint() {
+        removePoint(selection);
+    }
+
+    public boolean isWithPoints() {
+        return withPoints;
+    }
+
+    public void setWithPoints(boolean withPoints) {
+        this.withPoints = withPoints;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder r = new StringBuilder();
+        for (int i = 0; i < pts.npoints; i++) {
+            r.append(" ").append(pts.xpoints[i]).append(" ").append(pts.ypoints[i]);
+        }
+        return r.toString();
+    }
+
+    /**
+     * for testing purposes
+     * @param selection
+     */
+    void setSelection(int selection) {
+        this.selection = selection;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/Cubic.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/Cubic.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,57 @@
+/* Cubic.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+/** this class represents a cubic polynomial */
+/*  Part of NatCubic implementation, inspire by http://www.cse.unsw.edu.au/~lambert/*/
+public class Cubic {
+
+    float a, b, c, d;         /* a + b*u + c*u^2 +d*u^3 */
+
+
+    public Cubic(float a, float b, float c, float d) {
+        this.a = a;
+        this.b = b;
+        this.c = c;
+        this.d = d;
+    }
+
+    /** evaluate cubic */
+    public float eval(float u) {
+        return (((d * u) + c) * u + b) * u + a;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainter.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainter.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,259 @@
+/* ErrorPainter.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.*;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.RenderingHints;
+
+import javax.swing.SwingUtilities;
+import net.sourceforge.jnlp.runtime.Translator;
+import net.sourceforge.jnlp.splashscreen.parts.BasicComponentSplashScreen;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
+
+public final class ErrorPainter extends BasePainter {
+
+    //colors
+    private static final Color teaDeadColor = Color.darkGray;
+    private static final Color backgroundDeadColor = Color.gray;
+    private static final Color teaLeafsStalksDeadColor = new Color(100, 100, 100);
+    private static final Color pluginDeadColor = Color.darkGray;
+    private static final Color waterDeadColor = Color.darkGray;
+    private static final Color plainTextDeadColor = Color.white;
+    private static final String errorMessageKey = "SPLASHerror";
+    private static final String errorScreamMessageKey = "SPLASH_ERROR";
+    private static final Color errorScreamColor = Color.red;
+    //for clicking ot error message
+    private Point errorCorner = null;
+    private boolean errorIsScreamed = false;
+    private int errorScreamedPercentage = 100;
+
+    /**
+     * Interpolation is root ratior is r= (currentSize / origSize)
+     * then value to-from is interpolaed from to to from accroding to ratio
+     *
+     * @param origSize
+     * @param currentSize
+     * @param from
+     * @param to
+     * @return
+     */
+    public static double interpol(double origSize, double currentSize, double from, double to) {
+        return getRatio(origSize, currentSize) * (to - from) + from;
+    }
+
+    /**
+     * is interpolating one color to another based on ration current/orig
+     * Each (r,g,b,a) part of color is interpolated separately
+     * resturned is new color composed form new r,g,b,a
+     * @param origSize
+     * @param currentSize
+     * @param from
+     * @param to
+     * @return
+     */
+    public static Color interpolColor(double origSize, double currentSize, Color from, Color to) {
+        double r = interpol(origSize, currentSize, to.getRed(), from.getRed());
+        double g = interpol(origSize, currentSize, to.getGreen(), from.getGreen());
+        double b = interpol(origSize, currentSize, to.getBlue(), from.getBlue());
+        double a = interpol(origSize, currentSize, to.getAlpha(), from.getAlpha());
+        return new Color((int) r, (int) g, (int) b, (int) a);
+    }
+    //scaling end
+
+    public ErrorPainter(BasicComponentSplashScreen master) {
+        this(master, false);
+    }
+
+    public ErrorPainter(BasicComponentSplashScreen master, boolean startScream) {
+        super(master);
+        if (startScream) {
+            startErrorScream();
+        }
+
+    }
+
+    public void startErrorScream() {
+
+        errorIsScreamed = true;
+        getErrorScreamThread().start();
+        //are done after error scream
+        //setColors();
+        //prerenderedStuff = prerenderStill();
+
+    }
+
+    @Override
+    public void paint(Graphics g) {
+        Graphics2D g2d = (Graphics2D) g;
+        ensurePrerenderedStuff();
+        if (errorIsScreamed) {
+            paintStillTo(g2d, master.getInformationContent(), master.getVersion());
+        } else {
+            if (prerenderedStuff != null) {
+                g2d.drawImage(prerenderedStuff, 0, 0, null);
+            }
+        }
+
+        if (super.showNiceTexts) {
+            paintNiceTexts(g2d);
+        } else {
+            paintPlainTexts(g2d);
+        }
+
+        if (errorIsScreamed) {
+            g2d.setClip(0, 0, master.getPluginWidth(), master.getPluginHeight());
+            drawBigError(g2d);
+        }
+
+
+    }
+
+    private void drawBigError(Graphics2D g2d) {
+        Font f = new Font("Serif", Font.PLAIN, (int) scale(100, errorScreamedPercentage, master.getPluginHeight()));
+        g2d.setColor(errorScreamColor);
+        g2d.setFont(f);
+        drawTextAroundCenter(g2d, 0, getErrorScreamMessage());
+    }
+
+    public Point getErrorCorner() {
+        return errorCorner;
+    }
+
+    private void setColors() {
+
+        teaColor = teaDeadColor;
+        backgroundColor = backgroundDeadColor;
+        teaLeafsStalksColor = teaLeafsStalksDeadColor;
+        pluginColor = pluginDeadColor;
+        waterColor = waterDeadColor;
+
+    }
+
+    private void interpoleColors(int origSize, int currentSize) {
+        teaColor = interpolColor(origSize, currentSize, teaLiveColor, teaDeadColor);
+        backgroundColor = interpolColor(origSize, currentSize, backgroundLiveColor, backgroundDeadColor);
+        teaLeafsStalksColor = interpolColor(origSize, currentSize, teaLeafsStalksLiveColor, teaLeafsStalksDeadColor);
+        pluginColor = interpolColor(origSize, currentSize, pluginLiveColor, pluginDeadColor);
+        waterColor = interpolColor(origSize, currentSize, waterLiveColor, waterDeadColor);
+        plainTextColor = interpolColor(origSize, currentSize, plainTextLiveColor, plainTextDeadColor);
+    }
+
+    @Override
+    protected void paintStillTo(Graphics2D g2d, InformationElement ic, String version) {
+        RenderingHints r = g2d.getRenderingHints();
+        FontMetrics fm = drawBase(g2d, ic, version);
+        drawError(g2d, ic, version, fm);
+        g2d.setRenderingHints(r);
+    }
+
+    private String getErrorMessage() {
+        String localised = Translator.R(errorMessageKey);
+        //if (localised==null)return errorMessage;
+        return localised;
+    }
+
+    private String getErrorScreamMessage() {
+        String localised = Translator.R(errorScreamMessageKey);
+        //if (localised==null)return  errorScreamMessage;
+        return localised;
+    }
+
+    private Thread getErrorScreamThread() {
+        // Create a new thread to screem error for failure
+        Thread t = new Thread() {
+
+            @Override
+            public void run() {
+                try {
+                    while (errorIsScreamed) {
+                        errorScreamedPercentage -= 3;
+                        interpoleColors(100, errorScreamedPercentage);
+                        if (errorScreamedPercentage <= 5) {
+                            errorIsScreamed = false;
+                            setColors();
+                            prerenderedStuff = null;
+                        }
+                        SwingUtilities.invokeAndWait(new Runnable() {
+
+                            @Override
+                            public void run() {
+                                master.repaint();
+                            }
+                        });
+                        Thread.sleep(75);
+                        if (errorScreamedPercentage < 90 && errorScreamedPercentage > 80) {
+                            clearCachedWaterTextImage();
+                            canWave = false;
+                        }
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                } finally {
+                    canWave = true;
+                    errorIsScreamed = false;
+                    setColors();
+                    prerenderedStuff = null;
+                    master.repaint();
+
+                }
+            }
+        };
+        t.setDaemon(true);
+        return t;
+    }
+
+    private void drawError(Graphics2D g2d, InformationElement ic, String version, FontMetrics fm) {
+        int minh = fm.getHeight();
+        int minw = fm.stringWidth(getErrorMessage());
+        int space = 5;
+        g2d.setColor(backgroundColor);
+        errorCorner = new Point(master.getPluginWidth() - space * 4 - minw, master.getPluginHeight() - space * 4 - minh);
+        if (errorCorner.x < 0) {
+            errorCorner.x = 0;
+        }
+        g2d.fillRect(errorCorner.x, errorCorner.y, space * 4 + minw, space * 4 + minh);
+        g2d.setColor(plainTextColor);
+        g2d.drawRect(errorCorner.x + space, errorCorner.y + space, space * 2 + minw, space * 2 + minh);
+        g2d.drawString(getErrorMessage(), errorCorner.x + 2 * space, errorCorner.y + 5 * space);
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ImageFontCutter.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ImageFontCutter.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,152 @@
+/* ImageFontCutter.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.Shape;
+import java.awt.font.FontRenderContext;
+import java.awt.font.TextLayout;
+import java.awt.geom.AffineTransform;
+
+public class ImageFontCutter {
+
+    private Image img;
+    private Font font;
+    private Color textOutline;
+    private final String text;
+
+    public ImageFontCutter(Font f, String s) {
+        this.font = f;
+        textOutline = Color.black;
+        this.text = s;
+
+    }
+
+    public ImageFontCutter(Font f, String s, Color textOutline) {
+        this(f, s);
+        this.textOutline = textOutline;
+    }
+
+    public int getWidth() {
+        if (img == null) {
+            return -1;
+        }
+        return img.getWidth(null);
+    }
+
+    public int getHeight() {
+        if (img == null) {
+            return -1;
+        }
+        return img.getHeight(null);
+    }
+
+    public void cutTo(Graphics2D g2, int x, int y) {
+        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+                RenderingHints.VALUE_ANTIALIAS_ON);
+
+        g2.setRenderingHint(RenderingHints.KEY_RENDERING,
+                RenderingHints.VALUE_RENDER_QUALITY);
+
+        FontRenderContext frc = g2.getFontRenderContext();
+        TextLayout tl = new TextLayout(getText(), getFont(), frc);
+        float sw = (float) tl.getBounds().getWidth();
+        AffineTransform transform = new AffineTransform();
+        transform.setToTranslation(x, y);
+        Shape shape = tl.getOutline(transform);
+        Rectangle r = shape.getBounds();
+        g2.setColor(getTextOutline());
+        g2.draw(shape);
+        g2.setClip(shape);
+        g2.drawImage(getImg(), r.x, r.y, r.width, r.height, null);
+
+    }
+
+    /**
+     * @return the img
+     */
+    public Image getImg() {
+        return img;
+    }
+
+    /**
+     * @param img the img to set
+     */
+    public void setImg(Image img) {
+        this.img = img;
+    }
+
+    /**
+     * @return the font
+     */
+    public Font getFont() {
+        return font;
+    }
+
+    /**
+     * @param font the font to set
+     */
+    public void setFont(Font font) {
+        this.font = font;
+    }
+
+    /**
+     * @return the textOutline
+     */
+    public Color getTextOutline() {
+        return textOutline;
+    }
+
+    /**
+     * @param textOutline the textOutline to set
+     */
+    public void setTextOutline(Color textOutline) {
+        this.textOutline = textOutline;
+    }
+
+    /**
+     * @return the text
+     */
+    public String getText() {
+        return text;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingText.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingText.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,77 @@
+/* MovingText.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.GradientPaint;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.image.BufferedImage;
+
+public class MovingText extends TextWithWaterLevel {
+
+    public MovingText(String s, Font f) {
+        super(s, f);
+
+    }
+
+    @Override
+    public BufferedImage getBackground() {
+        Point p = getFutureSize();
+        int w = p.x;
+        int h = p.y;
+        if (w <= 0 || h <= 0) {
+            return null;
+        }
+        BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bi.createGraphics();
+
+        Color e1 = Color.gray;
+        Color s1 = Color.white;
+        int level = getPercentageOfWater() % (2 * w);
+        GradientPaint gradient = new GradientPaint(level - w, h / 2, s1, level, h / 2, e1, true);
+        g2d.setPaint(gradient);
+        g2d.fillRect(100, 100, 200, 120);
+
+        g2d.fillRect(0, 0, w, h);
+
+
+
+        return bi;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubic.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubic.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,121 @@
+/* NatCubic.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.*;
+
+public class NatCubic extends ControlCurve {
+
+    /* This calcualtion was insipred by http://www.cse.unsw.edu.au/~lambert/
+    NatCubic calcualtion
+    calculates the natural cubic spline that interpolates
+    y[0], y[1], ... y[n]
+    The first segment is returned as
+    C[0].a + C[0].b*u + C[0].c*u^2 + C[0].d*u^3 0<=u <1
+    the other segments are in C[1], C[2], ...  C[n-1] */
+    Cubic[] calcNaturalCubic(int n, int[] x) {
+        float[] gamma = new float[n + 1];
+        float[] delta = new float[n + 1];
+        float[] D = new float[n + 1];
+        int i;
+        /* We solve the equation
+        [2 1       ] [D[0]]   [3(x[1] - x[0])  ]
+        |1 4 1     | |D[1]|   |3(x[2] - x[0])  |
+        |  1 4 1   | | .  | = |      .         |
+        |    ..... | | .  |   |      .         |
+        |     1 4 1| | .  |   |3(x[n] - x[n-2])|
+        [       1 2] [D[n]]   [3(x[n] - x[n-1])]
+
+        by using row operations to convert the matrix to upper triangular
+        and then back sustitution.  The D[i] are the derivatives at the knots.
+         */
+
+        gamma[0] = 1.0f / 2.0f;
+        for (i = 1; i < n; i++) {
+            gamma[i] = 1 / (4 - gamma[i - 1]);
+        }
+        gamma[n] = 1 / (2 - gamma[n - 1]);
+
+        delta[0] = 3 * (x[1] - x[0]) * gamma[0];
+        for (i = 1; i < n; i++) {
+            delta[i] = (3 * (x[i + 1] - x[i - 1]) - delta[i - 1]) * gamma[i];
+        }
+        delta[n] = (3 * (x[n] - x[n - 1]) - delta[n - 1]) * gamma[n];
+
+        D[n] = delta[n];
+        for (i = n - 1; i >= 0; i--) {
+            D[i] = delta[i] - gamma[i] * D[i + 1];
+        }
+
+        /* now compute the coefficients of the cubics */
+        Cubic[] C = new Cubic[n];
+        for (i = 0; i < n; i++) {
+            C[i] = new Cubic((float) x[i], D[i], 3 * (x[i + 1] - x[i]) - 2 * D[i] - D[i + 1],
+                    2 * (x[i] - x[i + 1]) + D[i] + D[i + 1]);
+        }
+        return C;
+    }
+    final int STEPS = 12;
+
+    /* draw a cubic spline */
+    @Override
+    public void paint(Graphics g) {
+        super.paint(g);
+        if (pts.npoints >= 2) {
+            if (getResult() == null) {
+                calcualteAndSaveResult();
+            }
+            g.drawPolyline(result.xpoints, result.ypoints, result.npoints);
+        }
+    }
+
+    @Override
+    public Polygon calcualteResult() {
+        Cubic[] X = calcNaturalCubic(pts.npoints - 1, pts.xpoints);
+        Cubic[] Y = calcNaturalCubic(pts.npoints - 1, pts.ypoints);
+        /* very crude technique - just break each segment up into steps lines */
+        Polygon p = new Polygon();
+        p.addPoint((int) Math.round(X[0].eval(0)), (int) Math.round(Y[0].eval(0)));
+        for (int i = 0; i < X.length; i++) {
+            for (int j = 1; j <= STEPS; j++) {
+                float u = j / (float) STEPS;
+                p.addPoint(Math.round(X[i].eval(u)), Math.round(Y[i].eval(u)));
+            }
+        }
+        return p;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosed.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosed.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,101 @@
+/* NatCubicClosed.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+public class NatCubicClosed extends NatCubic {
+
+    /* This calcualtion was insipred by http://www.cse.unsw.edu.au/~lambert/
+    NatCubic calcualtion
+    calculates the closed natural cubic spline that interpolates
+    x[0], x[1], ... x[n]
+    The first segment is returned as
+    C[0].a + C[0].b*u + C[0].c*u^2 + C[0].d*u^3 0<=u <1
+    the other segments are in C[1], C[2], ...  C[n] */
+    @Override
+    Cubic[] calcNaturalCubic(int n, int[] x) {
+        float[] w = new float[n + 1];
+        float[] v = new float[n + 1];
+        float[] y = new float[n + 1];
+        float[] D = new float[n + 1];
+        float z, F, G, H;
+        int k;
+        /* We solve the equation
+        [4 1      1] [D[0]]   [3(x[1] - x[n])  ]
+        |1 4 1     | |D[1]|   |3(x[2] - x[0])  |
+        |  1 4 1   | | .  | = |      .         |
+        |    ..... | | .  |   |      .         |
+        |     1 4 1| | .  |   |3(x[n] - x[n-2])|
+        [1      1 4] [D[n]]   [3(x[0] - x[n-1])]
+
+        by decomposing the matrix into upper triangular and lower matrices
+        and then back sustitution.  See Spath "Spline Algorithms for Curves
+        and Surfaces" pp 19--21. The D[i] are the derivatives at the knots.
+         */
+        w[1] = v[1] = z = 1.0f / 4.0f;
+        y[0] = z * 3 * (x[1] - x[n]);
+        H = 4;
+        F = 3 * (x[0] - x[n - 1]);
+        G = 1;
+        for (k = 1; k < n; k++) {
+            v[k + 1] = z = 1 / (4 - v[k]);
+            w[k + 1] = -z * w[k];
+            y[k] = z * (3 * (x[k + 1] - x[k - 1]) - y[k - 1]);
+            H = H - G * w[k];
+            F = F - G * y[k - 1];
+            G = -v[k] * G;
+        }
+        H = H - (G + 1) * (v[n] + w[n]);
+        y[n] = F - (G + 1) * y[n - 1];
+
+        D[n] = y[n] / H;
+        D[n - 1] = y[n - 1] - (v[n] + w[n]) * D[n]; /* This equation is WRONG! in my copy of Spath */
+        for (k = n - 2; k >= 0; k--) {
+            D[k] = y[k] - v[k + 1] * D[k + 1] - w[k + 1] * D[n];
+        }
+
+
+        /* now compute the coefficients of the cubics */
+        Cubic[] C = new Cubic[n + 1];
+        for (k = 0; k < n; k++) {
+            C[k] = new Cubic((float) x[k], D[k], 3 * (x[k + 1] - x[k]) - 2 * D[k] - D[k + 1],
+                    2 * (x[k] - x[k + 1]) + D[k] + D[k + 1]);
+        }
+        C[n] = new Cubic((float) x[n], D[n], 3 * (x[0] - x[n]) - 2 * D[n] - D[0],
+                2 * (x[n] - x[0]) + D[n] + D[0]);
+        return C;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefs.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefs.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,198 @@
+/* SplinesDefs.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.Point;
+import java.awt.Polygon;
+
+public class SplinesDefs {
+
+    private final static Point[] mainLeafArray = {
+        new Point(268, 307),
+        new Point(274, 326),
+        new Point(289, 337),
+        new Point(317, 349),
+        new Point(362, 350),
+        new Point(413, 334),
+        new Point(428, 326),
+        new Point(453, 309),
+        new Point(469, 292),
+        new Point(496, 264),
+        new Point(516, 236),
+        new Point(531, 215),
+        new Point(550, 185),
+        new Point(567, 155),
+        new Point(580, 130),
+        new Point(571, 139),
+        new Point(555, 148),
+        new Point(540, 157),
+        new Point(521, 167),
+        new Point(502, 174),
+        new Point(477, 183),
+        new Point(443, 193),
+        new Point(413, 201),
+        new Point(392, 209),
+        new Point(376, 218),
+        new Point(363, 228),
+        new Point(356, 250),
+        new Point(372, 231),
+        new Point(398, 218),
+        new Point(420, 209),
+        new Point(446, 200),
+        new Point(479, 192),
+        new Point(505, 182),
+        new Point(547, 168),
+        new Point(539, 182),
+        new Point(526, 204),
+        new Point(509, 227),
+        new Point(498, 244),
+        new Point(486, 257),
+        new Point(469, 272),
+        new Point(460, 281),
+        new Point(449, 293),
+        new Point(436, 303),
+        new Point(418, 315),
+        new Point(400, 323),
+        new Point(383, 332),
+        new Point(367, 334),
+        new Point(343, 338),
+        new Point(322, 335),
+        new Point(304, 330),
+        new Point(288, 322)
+    };
+    private final static Point[] mainLeafStalkArray = {
+        new Point(353, 287),
+        new Point(366, 295),
+        new Point(376, 291),
+        new Point(392, 283),
+        new Point(428, 251),
+        new Point(441, 233),
+        new Point(462, 217),
+        new Point(446, 225),
+        new Point(434, 236),
+        new Point(428, 242),
+        new Point(408, 261),
+        new Point(392, 275),
+        new Point(373, 284),
+        new Point(363, 289)
+    };
+    private final static Point[] smallLeafArray = {
+        new Point(342, 207),
+        new Point(352, 213),
+        new Point(360, 218),
+        new Point(374, 217),
+        new Point(389, 202),
+        new Point(397, 175),
+        new Point(396, 143),
+        new Point(397, 113),
+        new Point(380, 127),
+        new Point(350, 145),
+        new Point(327, 155),
+        new Point(313, 166),
+        new Point(297, 182),
+        new Point(293, 196),
+        new Point(308, 183),
+        new Point(332, 167),
+        new Point(364, 150),
+        new Point(385, 137),
+        new Point(384, 158),
+        new Point(382, 187),
+        new Point(371, 204)
+    };
+    private final static Point[] smallLeafStalkArray = {
+        new Point(320, 203),
+        new Point(331, 191),
+        new Point(345, 185),
+        new Point(356, 183),
+        new Point(365, 177),
+        new Point(368, 171),
+        new Point(368, 165),
+        new Point(360, 173),
+        new Point(354, 176),
+        new Point(341, 180),
+        new Point(334, 184),
+        new Point(321, 194)
+    };
+
+    public static Polygon getMainLeaf(Double scalex, double scaley) {
+
+        return polygonizeControlPoints(mainLeafArray, scalex, scaley);
+    }
+
+    static Polygon polygonizeControlPoints(Point[] pp, Double scalex, double scaley) {
+        Polygon r = new Polygon();
+        for (int i = 0; i < pp.length; i++) {
+            Point p = pp[i];
+            r.addPoint((int) ((double) p.x * (double) scalex), (int) ((double) p.y * (double) scaley));
+        }
+        return r;
+    }
+
+    public static Polygon getSecondLeaf(Double scalex, double scaley) {
+        return polygonizeControlPoints(smallLeafArray, scalex, scaley);
+    }
+
+    public static Polygon getSecondLeafStalk(Double scalex, double scaley) {
+        return polygonizeControlPoints(smallLeafStalkArray, scalex, scaley);
+    }
+
+    public static Polygon getMainLeafStalk(Double scalex, double scaley) {
+        return polygonizeControlPoints(mainLeafStalkArray, scalex, scaley);
+    }
+
+    public static Polygon getMainLeafCurve(Double scalex, double scaley) {
+        return getNatCubicClosed(getMainLeaf(scalex, scaley));
+    }
+
+    public static Polygon getMainLeafStalkCurve(Double scalex, double scaley) {
+        return getNatCubicClosed(getMainLeafStalk(scalex, scaley));
+    }
+
+    public static Polygon getSecondLeafCurve(Double scalex, double scaley) {
+        return getNatCubicClosed(getSecondLeaf(scalex, scaley));
+    }
+
+    public static Polygon getSecondLeafStalkCurve(Double scalex, double scaley) {
+        return getNatCubicClosed(getSecondLeafStalk(scalex, scaley));
+    }
+
+    static Polygon getNatCubicClosed(Polygon p) {
+        NatCubicClosed c = new NatCubicClosed();
+        c.setSourcePolygon(p);
+        return c.calcualteResult();
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevel.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevel.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,179 @@
+/* TextWithWaterLevel.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.Polygon;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.RenderingHints;
+import java.awt.image.BufferedImage;
+import java.util.Random;
+
+public class TextWithWaterLevel extends ImageFontCutter {
+
+    private Color waterColor;
+    private Color bgColor;
+    private int percentageOfWater;
+    private Random sea = new Random();
+    //set to null befor getBackground if waving is needed
+    //or create new TWL ;)
+    private Polygon cachedPolygon;
+
+    public TextWithWaterLevel(String s, Font f) {
+        super(f, s);
+        waterColor = Color.BLUE;
+        bgColor = Color.white;
+
+    }
+
+    protected Point getFutureSize() {
+        BufferedImage bi = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+        FontMetrics fm = bi.createGraphics().getFontMetrics(getFont());
+        int w = fm.stringWidth(getText());
+        int h = fm.getHeight();
+        return new Point(w, h);
+    }
+
+    public BufferedImage getBackground() {
+        Point p = getFutureSize();
+        int w = p.x;
+        int h = p.y;
+        if (w <= 0 || h <= 0) {
+            return null;
+        }
+        BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bi.createGraphics();
+        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+        g2d.setColor(bgColor);
+        g2d.fillRect(0, 0, w, h);
+        if (cachedPolygon == null) {
+            int level = (h * percentageOfWater) / 100;
+            int waveHeight = 10;
+            int waveLength = 20;
+            if (level > waveHeight / 2 + 1) {
+                NatCubic line = new NatCubic();
+                int x = 0;
+                while (x < w + 2 * waveLength) {
+                    line.addPoint(x, h - level - waveHeight / 2 - sea.nextInt(waveHeight));
+                    x = x + waveLength;
+                }
+                cachedPolygon = line.calcualteResult();
+                cachedPolygon.addPoint(w, h);
+                cachedPolygon.addPoint(0, h);
+            }
+        }
+        g2d.setColor(waterColor);
+        if (cachedPolygon != null) {
+            g2d.fillPolygon(cachedPolygon);
+        }
+        //line.paint(g2d);
+        //FlodFill.floodFill(bi, waterColor, new Point(1, h - 1));
+        return bi;
+    }
+
+    public Polygon getCachedPolygon() {
+        return cachedPolygon;
+    }
+
+    public void setCachedPolygon(Polygon cachedPolygon) {
+        this.cachedPolygon = cachedPolygon;
+    }
+
+    @Override
+    public void cutTo(Graphics2D g2, int x, int y) {
+        if (this.getImg() == null) {
+            this.setImg(getBackground());
+        }
+        if (this.getImg() == null) {
+            return;
+        }
+        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+        g2.setFont(getFont());
+        g2.setColor(getTextOutline());
+        g2.drawString(getText(), x, y - 2);
+        g2.drawString(getText(), x, y + 2);
+        g2.drawString(getText(), x - 2, y);
+        g2.drawString(getText(), x + 2, y);
+        //sorry, cuted text have disturbed borders
+        super.cutTo(g2, x, y);
+    }
+
+    /**
+     * @return the waterColor
+     */
+    public Color getWaterColor() {
+        return waterColor;
+    }
+
+    /**
+     * @param waterColor the waterColor to set
+     */
+    public void setWaterColor(Color waterColor) {
+        this.waterColor = waterColor;
+    }
+
+    /**
+     * @return the bgColor
+     */
+    public Color getBgColor() {
+        return bgColor;
+    }
+
+    /**
+     * @param bgColor the bgColor to set
+     */
+    public void setBgColor(Color bgColor) {
+        this.bgColor = bgColor;
+    }
+
+    /**
+     * @return the percentageOfWater
+     */
+    public int getPercentageOfWater() {
+        return percentageOfWater;
+    }
+
+    /**
+     * @param percentageOfWater the percentageOfWater to set
+     */
+    public void setPercentageOfWater(int percentageOfWater) {
+        this.percentageOfWater = percentageOfWater;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreen.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreen.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,85 @@
+/* BasicComponentSplashScreen.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import net.sourceforge.jnlp.splashscreen.SplashErrorPanel;
+
+public abstract class BasicComponentErrorSplashScreen extends BasicComponentSplashScreen implements SplashErrorPanel {
+
+    /**
+     * When applet loading fails, then dying stacktrace can be stted, and is then shown to user on demand.
+     */
+    private Throwable loadingException;
+   
+
+    /**
+     * @return the loadingException
+     */
+    @Override
+    public Throwable getLoadingException() {
+        return loadingException;
+    }
+
+    /**
+     * @param loadingException the loadingException to set
+     */
+    @Override
+    public void setLoadingException(Throwable loadingException) {
+        this.loadingException = loadingException;
+    }
+
+   
+
+    protected void raiseExceptionDialogNOW() {
+        JEditorPaneBasedExceptionDialog dialog = new JEditorPaneBasedExceptionDialog(null, true, getLoadingException(), getInformationContent(), createAditionalInfo());
+        dialog.setVisible(true);
+    }
+
+    protected void raiseExceptionDialogQUEUED() {
+        java.awt.EventQueue.invokeLater(new Runnable() {
+
+            @Override
+            public void run() {
+                raiseExceptionDialogNOW();
+            }
+        });
+    }
+
+    protected void raiseExceptionDialog() {
+        raiseExceptionDialogQUEUED();
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreen.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreen.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,156 @@
+/* BasicComponentSplashScreen.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import javax.swing.JComponent;
+import net.sourceforge.jnlp.splashscreen.SplashPanel;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+
+public abstract class BasicComponentSplashScreen extends JComponent implements SplashPanel {
+    //scaling 100%
+    public static final double ORIGINAL_W = 635;
+    public static final double ORIGINAL_H = 480;
+       /** Width of the plugin window */
+    protected int pluginWidth;
+    /** Height of the plugin window */
+    protected int pluginHeight;
+    /** The project name to display */
+    private SplashReason splashReason;
+    private boolean animationRunning = false;
+    private InformationElement content;
+    private String version;
+
+    @Override
+    public JComponent getSplashComponent() {
+        return this;
+    }
+
+    @Override
+    public boolean isAnimationRunning() {
+        return animationRunning;
+    }
+
+    public void setAnimationRunning(boolean b){
+        animationRunning=b;
+    }
+
+    @Override
+    public void setInformationElement(InformationElement content) {
+        this.content = content;
+    }
+
+    @Override
+    public InformationElement getInformationContent() {
+        return content;
+    }
+
+   
+    /**
+     * @return the pluginWidth
+     */
+    @Override
+    public int getPluginWidth() {
+        return pluginWidth;
+    }
+
+    /**
+     * @param pluginWidth the pluginWidth to set
+     */
+    @Override
+    public void setPluginWidth(int pluginWidth) {
+        this.pluginWidth = pluginWidth;
+    }
+
+    /**
+     * @return the pluginHeight
+     */
+    @Override
+    public int getPluginHeight() {
+        return pluginHeight;
+    }
+
+    /**
+     * @param pluginHeight the pluginHeight to set
+     */
+    @Override
+    public void setPluginHeight(int pluginHeight) {
+        this.pluginHeight = pluginHeight;
+    }
+
+    /**
+     * @return the splashReason
+     */
+    @Override
+    public SplashReason getSplashReason() {
+        return splashReason;
+    }
+
+    /**
+     * @param splashReason the splashReason to set
+     */
+    @Override
+    public void setSplashReason(SplashReason splashReason) {
+        this.splashReason = splashReason;
+    }
+
+    /**
+     * @return the version
+     */
+    @Override
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * @param version the version to set
+     */
+    @Override
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+   
+    protected String createAditionalInfo() {
+        if (getVersion() != null) {
+            return getSplashReason().toString() + " version: " + getVersion();
+        } else {
+            return null;
+        }
+    }
+
+   
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItem.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItem.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,132 @@
+/* DescriptionInfoItem.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+/**
+ *description element: A short statement about the application. Description 
+ * elements are optional. The kind attribute defines how the description should
+ * be used. It can have one of the following values:
+ *
+ *   * one-line: If a reference to the application is going to appear on one row
+ *     in a list or a table, this description will be used.
+ *   * short: If a reference to the application is going to be displayed in a
+ *     situation where there is room for a paragraph, this description is used.
+ *   * tooltip: If a reference to the application is going to appear in a
+ *     tooltip, this description is used.
+ *
+ * Only one description element of each kind can be specified. A description
+ *  element without a kind is used as a default value. Thus, if Java Web Start
+ *  needs a description of kind short, and it is not specified in the JNLP file,
+ *  then the text from the description without an attribute is used.
+ *
+ * All descriptions contain plain text. No formatting, such as with HTML tags,
+ *  is supported.
+ */
+public class DescriptionInfoItem extends InfoItem {
+
+    String kind;
+
+    public DescriptionInfoItem(String value, String kind) {
+        super(InfoItem.description, value);
+        this.kind = kind;
+    }
+
+    public String getKind() {
+        return kind;
+    }
+
+    public void setKind(String kind) {
+        this.kind = kind;
+    }
+
+    public boolean isOfSameKind(DescriptionInfoItem o) {
+        if (o.getKind() == null && getKind() == null) {
+            return true;
+        }
+        if (o.getKind() == null && getKind() != null) {
+            return false;
+        }
+        if (o.getKind() != null && getKind() == null) {
+            return false;
+        }
+        return (o.getKind().equals(getKind()));
+    }
+
+    public boolean isSame(DescriptionInfoItem o) {
+        return isOfSameKind(o) && isofSameType(o);
+
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof DescriptionInfoItem)) {
+            return false;
+        }
+        DescriptionInfoItem o = (DescriptionInfoItem) obj;
+        return super.equals(o) && isOfSameKind(o);
+
+
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 7;
+        hash = 59 * hash + (this.kind != null ? this.kind.hashCode() : 0);
+        hash = 59 * hash + (this.getType() != null ? this.getType().hashCode() : 0);
+        hash = 59 * hash + (this.getValue() != null ? this.getValue().hashCode() : 0);
+        return hash;
+    }
+
+    @Override
+    public String toString() {
+        return super.toString() + " (" + getKind() + ")";
+    }
+
+    @Override
+    public String toXml() {
+        if (kind==null){
+            return super.toXml();
+        }
+        return "<"+type+" kind=\""+kind+"\">"+value+"</"+type+">";
+    }
+
+    @Override
+    public String toNiceString() {
+        return super.toNiceString();
+    }
+
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/InfoItem.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/InfoItem.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,145 @@
+/* InfoItem.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import net.sourceforge.jnlp.InformationDesc;
+import net.sourceforge.jnlp.runtime.Translator;
+
+/**
+ *The optional kind="splash" attribute may be used in an icon element to indicate that the image is to be used as a "splash" screen during the launch of an application. If the JNLP file does not contain an icon element with kind="splash" attribute, Java Web Start will construct a splash screen using other items from the information Element.
+ *If the JNLP file does not contain any icon images, the splash image will consist of the application's title and vendor, as taken from the JNLP file.
+ *
+ * items not used inside
+ */
+public class InfoItem {
+
+    public static final String SPLASH = "SPLASH";
+    public static final String title = "title";
+    public static final String vendor = "vendor";
+    public static final String homepage = "homepage";
+    public static final String homepageHref = "href";
+    public static final String description = "description";
+    public static final String descriptionKind = "kind";
+    public static final String descriptionKindOneLine = (String) InformationDesc.ONE_LINE;
+    //when no kind is specified, then it should behave as short
+    public static final String descriptionKindShort = (String) InformationDesc.SHORT;
+    public static final String descriptionKindToolTip = (String) InformationDesc.TOOLTIP;
+    protected String type;
+    protected String value;
+
+
+    public InfoItem(String type, String value) {
+        this.type = type;
+        this.value = value;
+    }
+
+    /**
+     * @return the type
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * @param type the type to set
+     */
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    /**
+     * @return the value
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * @param value the value to set
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public boolean isofSameType(InfoItem o) {
+        return ((getType().equals(o.getType())));
+
+
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof InfoItem)) {
+            return false;
+        }
+        InfoItem o = (InfoItem) obj;
+        return isofSameType(o) && (getValue().equals(o.getValue()));
+
+
+
+    }
+
+    @Override
+    public String toString() {
+        return type + ": " + value;
+    }
+
+
+    public String toXml() {
+        if (type.equals(homepage)){
+        return "<"+type+" "+homepageHref+"=\""+value+"\"/>";
+        }
+        return "<"+type+">"+value+"</"+type+">";
+    }
+
+    public String toNiceString() {
+        String key = SPLASH + type;
+        return localise(key, value);
+    }
+
+    public static String localise(String key, String s) {
+        return Translator.R(key) + ": " + s;
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 7;
+        hash = 59 * hash + (this.getType() != null ? this.getType().hashCode() : 0);
+        hash = 59 * hash + (this.getValue() != null ? this.getValue().hashCode() : 0);
+        return hash;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/InformationElement.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/InformationElement.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,215 @@
+/* InformationElement.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+/**
+http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html
+ */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import net.sourceforge.jnlp.InformationDesc;
+import net.sourceforge.jnlp.JNLPFile;
+
+/**
+ *
+ */
+public class InformationElement {
+
+    private InfoItem title;
+    private InfoItem vendor;
+    private InfoItem homepage;
+    private List<DescriptionInfoItem> descriptions = new ArrayList<DescriptionInfoItem>(5);
+
+    public void setTitle(String title) {
+        if (title == null) {
+            return;
+        }
+        this.title = new InfoItem(InfoItem.title, title);
+    }
+
+    public void setvendor(String vendor) {
+        if (vendor == null) {
+            return;
+        }
+        this.vendor = new InfoItem(InfoItem.vendor, vendor);
+    }
+
+    public void setHomepage(String homepage) {
+        if (homepage == null) {
+            return;
+        }
+        this.homepage = new InfoItem(InfoItem.homepage, homepage);
+    }
+
+    public void addDescription(String description) {
+        addDescription(description, null);
+    }
+
+    /**
+     * Just one description of each kind (4 including null)  are  allowed in information element.
+     * This method should throw exception when trying to add second description of same kind
+     * But I do not consider it as good idea to force this behaviour for somesing like psalsh screen,
+     * so I jsut replace the previous one with new one. without any warning
+     */
+    public void addDescription(String description, String kind) {
+        if (description == null) {
+            return;
+        }
+        DescriptionInfoItem d = new DescriptionInfoItem(description, kind);
+        for (DescriptionInfoItem descriptionInfoItem : descriptions) {
+            if (descriptionInfoItem.isOfSameKind(d)) {
+                descriptions.remove(descriptionInfoItem);
+                descriptions.add(d);
+                return;
+            }
+        }
+        descriptions.add(d);
+
+    }
+
+    public InfoItem getBestMatchingDescriptionForSplash() {
+        for (DescriptionInfoItem d : descriptions) {
+            if (InfoItem.descriptionKindOneLine.equals(d.getKind())) {
+                return d;
+            }
+        }
+        for (DescriptionInfoItem d : descriptions) {
+            if (d.getKind() == null) {
+                return d;
+            }
+        }
+        return null;
+    }
+
+    public InfoItem getLongestDescriptionForSplash() {
+        for (DescriptionInfoItem d : descriptions) {
+            if (InfoItem.descriptionKindShort.equals(d.getKind())) {
+                return d;
+            }
+        }
+        for (DescriptionInfoItem d : descriptions) {
+            if (d.getKind() == null) {
+                return d;
+            }
+        }
+        for (DescriptionInfoItem d : descriptions) {
+            if (InfoItem.descriptionKindOneLine.equals(d.getKind())) {
+                return d;
+            }
+        }
+        for (DescriptionInfoItem d : descriptions) {
+            if (InfoItem.descriptionKindToolTip.equals(d.getKind())) {
+                return d;
+            }
+        }
+        return null;
+    }
+
+    public String getTitle() {
+        if (title == null) {
+            return null;
+        }
+        return title.toNiceString();
+    }
+
+    public String getVendor() {
+        if (vendor == null) {
+            return null;
+        }
+        return vendor.toNiceString();
+    }
+
+    public String getHomepage() {
+        if (homepage == null) {
+            return null;
+        }
+        return homepage.toNiceString();
+    }
+
+    List<DescriptionInfoItem> getDescriptions() {
+        return Collections.unmodifiableList(descriptions);
+    }
+
+
+
+    public String getDescription() {
+        InfoItem i = getBestMatchingDescriptionForSplash();
+        if (i == null) {
+            return null;
+        }
+        return i.toNiceString();
+    }
+
+    public List<String> getHeader() {
+        List<String> r = new ArrayList<String>(4);
+        String t = getTitle();
+        String v = getVendor();
+        String h = getHomepage();
+        if (t != null) {
+            r.add(t);
+        }
+        if (v != null) {
+            r.add(v);
+        }
+        if (h != null) {
+            r.add(h);
+        }
+
+        return r;
+    }
+
+    public static InformationElement createFromJNLP(JNLPFile file) {
+        if (file == null) {
+            return null;
+        }
+        try {
+            InformationElement ie = new InformationElement();
+            ie.setHomepage(file.getInformation().getHomepage().toString());
+            ie.setTitle(file.getInformation().getTitle());
+            ie.setvendor(file.getInformation().getVendor());
+            ie.addDescription(file.getInformation().getDescriptionStrict((String)(InformationDesc.DEFAULT)));
+            ie.addDescription(file.getInformation().getDescriptionStrict(InfoItem.descriptionKindOneLine), InfoItem.descriptionKindOneLine);
+            ie.addDescription(file.getInformation().getDescriptionStrict(InfoItem.descriptionKindShort), InfoItem.descriptionKindShort);
+            ie.addDescription(file.getInformation().getDescriptionStrict(InfoItem.descriptionKindToolTip), InfoItem.descriptionKindToolTip);
+            return ie;
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return null;
+        }
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,355 @@
+/* JeditorPaneBasedExceptionDialog.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.awt.Toolkit;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.StringSelection;
+import java.awt.event.WindowEvent;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.List;
+import javax.swing.BorderFactory;
+import javax.swing.GroupLayout;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JEditorPane;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.LayoutStyle;
+import javax.swing.SwingConstants;
+import javax.swing.WindowConstants;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
+import net.sourceforge.jnlp.runtime.Translator;
+
+public class JEditorPaneBasedExceptionDialog extends JDialog implements HyperlinkListener {
+
+    // components
+    private JButton closeButton;
+    private JButton closeAndCopyButton;
+    private JButton homeButton;
+    private JEditorPane htmlErrorAndHelpPanel;
+    private JLabel exceptionLabel;
+    private JLabel iconLabel;
+    private JPanel mainPanel;
+    private JPanel topPanel;
+    private JPanel bottomPanel;
+    private JScrollPane htmlPaneScroller;
+    // End of components declaration
+    private final String message;
+    private final Throwable exception;
+
+    /** Creates new form JEditorPaneBasedExceptionDialog */
+    public JEditorPaneBasedExceptionDialog(java.awt.Frame parent, boolean modal, Throwable ex, InformationElement information, String anotherInfo) {
+        super(parent, modal);
+        initComponents();
+        htmlErrorAndHelpPanel.setContentType("text/html");
+        htmlErrorAndHelpPanel.setEditable(false);
+        List<String> l = infoElementToList(information);
+        this.message = getText(ex, l, anotherInfo);
+        this.exception = ex;
+        if (exception == null) {
+            closeAndCopyButton.setVisible(false);
+        }
+        htmlErrorAndHelpPanel.setText(message);
+        //htmlPaneScroller.getVerticalScrollBar().setValue(1);
+        htmlErrorAndHelpPanel.setCaretPosition(0);
+        try {
+            Icon icon = new ImageIcon(this.getClass().getResource("/net/sourceforge/jnlp/resources/warning.png"));
+            iconLabel.setIcon(icon);
+        } catch (Exception lex) {
+            lex.printStackTrace();
+        }
+        htmlErrorAndHelpPanel.addHyperlinkListener(this);
+        homeButton.setVisible(false);
+        this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+
+
+    }
+
+    static List<String> infoElementToList(InformationElement information) {
+        List<String> l = null;
+        if (information != null) {
+            l = information.getHeader();
+            InfoItem ii = information.getLongestDescriptionForSplash();
+            if (ii != null) {
+                l.add(ii.toNiceString());
+            }
+        }
+        return l;
+    }
+
+    private void initComponents() {
+
+        topPanel = new JPanel();
+        closeButton = new JButton();
+        closeAndCopyButton = new JButton();
+        mainPanel = new JPanel();
+        exceptionLabel = new JLabel();
+        iconLabel = new JLabel();
+        bottomPanel = new JPanel();
+        htmlPaneScroller = new JScrollPane();
+        htmlErrorAndHelpPanel = new JEditorPane();
+        homeButton = new JButton();
+
+        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+
+        closeButton.setText(Translator.R(InfoItem.SPLASH + "Close"));
+        closeButton.addActionListener(new java.awt.event.ActionListener() {
+
+            @Override
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                closeWindowButtonActionPerformed(evt);
+            }
+        });
+
+        closeAndCopyButton.setText(Translator.R(InfoItem.SPLASH + "closewAndCopyException"));
+        closeAndCopyButton.addActionListener(new java.awt.event.ActionListener() {
+
+            @Override
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                copyAndCloseButtonActionPerformed(evt);
+            }
+        });
+
+        GroupLayout jPanel2Layout = new GroupLayout(topPanel);
+        topPanel.setLayout(jPanel2Layout);
+        jPanel2Layout.setHorizontalGroup(
+                jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addComponent(closeButton).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 314, Short.MAX_VALUE).addComponent(closeAndCopyButton).addContainerGap()));
+        jPanel2Layout.setVerticalGroup(
+                jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup().addContainerGap(24, Short.MAX_VALUE).addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(closeButton).addComponent(closeAndCopyButton)).addContainerGap()));
+
+        exceptionLabel.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
+        exceptionLabel.setHorizontalAlignment(SwingConstants.CENTER);
+        exceptionLabel.setText(Translator.R(InfoItem.SPLASH + "exOccured"));
+
+        bottomPanel.setBorder(BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
+        bottomPanel.setLayout(new java.awt.BorderLayout());
+
+        htmlPaneScroller.setViewportView(htmlErrorAndHelpPanel);
+
+        bottomPanel.add(htmlPaneScroller, java.awt.BorderLayout.CENTER);
+
+        homeButton.setText(Translator.R(InfoItem.SPLASH + "Home"));
+        homeButton.addActionListener(new java.awt.event.ActionListener() {
+
+            @Override
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                homeButtonActionPerformed(evt);
+            }
+        });
+
+        GroupLayout jPanel1Layout = new GroupLayout(mainPanel);
+        mainPanel.setLayout(jPanel1Layout);
+        jPanel1Layout.setHorizontalGroup(
+                jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(iconLabel, GroupLayout.PREFERRED_SIZE, 71, GroupLayout.PREFERRED_SIZE).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(exceptionLabel, GroupLayout.DEFAULT_SIZE, 503, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(homeButton, GroupLayout.PREFERRED_SIZE, 101, GroupLayout.PREFERRED_SIZE).addContainerGap()).addComponent(bottomPanel, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 723, Short.MAX_VALUE));
+        jPanel1Layout.setVerticalGroup(
+                jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(iconLabel, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE).addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(exceptionLabel, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE).addComponent(homeButton, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE))).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(bottomPanel, GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)));
+
+        GroupLayout layout = new GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+                layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(mainPanel, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(topPanel, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addContainerGap()));
+        layout.setVerticalGroup(
+                layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(mainPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(topPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addContainerGap()));
+
+        pack();
+    }
+
+    private void copyAndCloseButtonActionPerformed(java.awt.event.ActionEvent evt) {
+        if (exception != null) {
+            try {
+                StringSelection data = new StringSelection(getExceptionStackTraceAsString(exception));
+                Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+                clipboard.setContents(data, data);
+            } catch (Exception ex) {
+                JOptionPane.showMessageDialog(this, Translator.R(InfoItem.SPLASH + "cantCopyEx"));
+                ex.printStackTrace();
+            }
+        } else {
+            JOptionPane.showMessageDialog(this, Translator.R(InfoItem.SPLASH + "noExRecorded"));
+        }
+        close();
+    }
+
+    private void homeButtonActionPerformed(java.awt.event.ActionEvent evt) {
+        htmlErrorAndHelpPanel.setText(message);
+        homeButton.setVisible(false);
+    }
+
+    private void closeWindowButtonActionPerformed(java.awt.event.ActionEvent evt) {
+        close();
+    }
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[]) {
+        java.awt.EventQueue.invokeLater(new Runnable() {
+
+            public void run() {
+                Exception ex = new RuntimeException("dsgsfdg");
+                JEditorPaneBasedExceptionDialog dialog = new JEditorPaneBasedExceptionDialog(new JFrame(), true, ex, null, "uaaa: aaa\nwqdeweq:sdsds");
+                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
+
+                    public void windowClosing(java.awt.event.WindowEvent e) {
+                        System.exit(0);
+                    }
+                });
+                dialog.setVisible(true);
+            }
+        });
+    }
+
+    static String getText(Throwable ex, List<String> l, String anotherInfo) {
+        StringBuilder s = new StringBuilder("<html><body>");
+        String info = "<p>"
+                + Translator.R(InfoItem.SPLASH + "mainL1") + " "
+                + " <a href=\""
+                + Translator.R(InfoItem.SPLASH + "url")
+                + "\">"
+                + Translator.R(InfoItem.SPLASH + "urlLooks") + "</a> "
+                + Translator.R(InfoItem.SPLASH + "mainL2")
+                + " </p> \n";
+        String t = "<p>"
+                + Translator.R(InfoItem.SPLASH + "mainL3")
+                + "</p> \n"
+                + info + formatListInfoList(l) + formatInfo(anotherInfo);
+        Object[] options = new String[2];
+        options[0] = Translator.R(InfoItem.SPLASH + "Close");
+        options[1] = Translator.R(InfoItem.SPLASH + "closeAndCopyShorter");
+        if (ex != null) {
+            t = "<p>"
+                    + Translator.R(InfoItem.SPLASH + "mainL4")
+                    + " </p>\n"
+                    + info + formatListInfoList(l) + formatInfo(anotherInfo)
+                    + "<p>"
+                    + Translator.R(InfoItem.SPLASH + "exWas")
+                    + " <br/>\n" + "<pre>" + getExceptionStackTraceAsString(ex) + "</pre>";
+
+
+        } else {
+            t += formatListInfoList(l);
+        }
+        s.append(t);
+        s.append("</body></html>");
+        return s.toString();
+    }
+
+    public static String getExceptionStackTraceAsString(Throwable exception) {
+        if (exception == null) {
+            return "";
+        }
+        StringWriter sw = new StringWriter();
+        exception.printStackTrace(new PrintWriter(sw));
+        return sw.toString();
+    }
+
+    public static String[] getExceptionStackTraceAsStrings(Throwable exception) {
+        if (exception == null) {
+            return new String[0];
+        }
+        StringWriter sw = new StringWriter();
+        exception.printStackTrace(new PrintWriter(sw));
+        return sw.toString().split("\n");
+    }
+
+    @Override
+    public void hyperlinkUpdate(HyperlinkEvent event) {
+        if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
+            try {
+                htmlErrorAndHelpPanel.setPage(event.getURL());
+                homeButton.setVisible(true);
+
+            } catch (Exception ioe) {
+                JOptionPane.showMessageDialog(this, Translator.R(InfoItem.SPLASH + "cfl") + " "
+                        + event.getURL().toExternalForm() + ": " + ioe);
+            }
+        }
+    }
+
+    private void close() {
+        processWindowEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));
+    }
+
+    static String formatListInfoList(List<String> l) {
+        if (l == null) {
+            return "";
+        }
+        StringBuilder sb = new StringBuilder();
+        sb.append("<p>");
+        sb.append("<h3>").
+                append(Translator.R(InfoItem.SPLASH + "vendorsInfo")).append(":</h3>");
+        sb.append("<pre>");
+        for (int i = 0; i < l.size(); i++) {
+            String string = l.get(i);
+            sb.append(string).append("\n");
+        }
+        sb.append("</pre>");
+        sb.append("</p>");
+        return sb.toString();
+    }
+
+    static String formatInfo(String l) {
+        if (l == null) {
+            return "";
+        }
+        StringBuilder sb = new StringBuilder();
+        sb.append("<p>");
+        sb.append("<h3>").
+                append(Translator.R(InfoItem.SPLASH + "anotherInfo")).append(": </h3>");
+        sb.append("<pre>");
+        sb.append(l);
+        sb.append("</pre>");
+        sb.append("</p>");
+        return sb.toString();
+    }
+
+    Throwable getException() {
+        return exception;
+    }
+
+    String getMessage() {
+        return message;
+    }
+}
diff -r 01544fb82384 plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
--- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Wed Aug 01 13:40:20 2012 +0200
@@ -76,6 +76,7 @@
 import java.awt.event.WindowListener;
 import java.awt.print.PageFormat;
 import java.awt.print.Printable;
+import java.awt.Component;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintStream;
@@ -93,10 +94,8 @@
 import java.security.PrivilegedExceptionAction;
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Vector;
 
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
@@ -115,6 +114,11 @@
 import sun.misc.Ref;
 
 import com.sun.jndi.toolkit.url.UrlUtil;
+import java.util.Hashtable;
+import java.util.Vector;
+import net.sourceforge.jnlp.splashscreen.SplashController;
+import net.sourceforge.jnlp.splashscreen.SplashPanel;
+import net.sourceforge.jnlp.splashscreen.SplashUtils;
 
 /**
  * Lets us construct one using unix-style one shot behaviors
@@ -145,7 +149,12 @@
             @Override public void run() {
                 panel.createNewAppContext();
                 // create the frame.
-                PluginAppletViewer.framePanel(identifier, handle, panel);
+                int width = Integer.parseInt(atts.get("width"));
+                int height = Integer.parseInt(atts.get("height"));
+
+                PluginDebug.debug("X and Y are: " + width + " " + height);
+                panel.setAppletViewerFrame(PluginAppletViewer.framePanel(identifier,handle, width, height, panel));
+
                 panel.init();
                 // Start the applet
                 initEventQueue(panel);
@@ -198,6 +207,8 @@
             ie.printStackTrace();
         }
 
+        panel.removeSplash();
+
         AppletSecurityContextManager.getSecurityContext(0).associateSrc(panel.getAppletClassLoader(), doc);
         AppletSecurityContextManager.getSecurityContext(0).associateInstance(identifier, panel.getAppletClassLoader());
 
@@ -271,7 +282,7 @@
 // FIXME: declare JSProxy implementation
 @SuppressWarnings("serial")
 public class PluginAppletViewer extends XEmbeddedFrame
-        implements AppletContext, Printable {
+        implements AppletContext, Printable, SplashController {
 
     /**
      *  Enumerates the current status of an applet
@@ -323,26 +334,32 @@
     private Image bufFrameImg;
     private Graphics bufFrameImgGraphics;
 
+
+    private SplashPanel splashPanel;
+ 
     /**
      * Null constructor to allow instantiation via newInstance()
      */
     public PluginAppletViewer() {
     }
 
-    public static void framePanel(int identifier, long handle, NetxPanel panel) {
+     public static synchronized  PluginAppletViewer framePanel(int identifier,long handle, int width, int height, NetxPanel panel) {
 
         PluginDebug.debug("Framing ", panel);
-
-        // SecurityManager MUST be set, and only privileged code may call reFrame()
+ 
+        // SecurityManager MUST be set, and only privileged code may call framePanel()
         System.getSecurityManager().checkPermission(new AllPermission());
 
         PluginAppletViewer appletFrame = new PluginAppletViewer(handle, identifier, panel);
-
-        appletFrame.add("Center", panel);
-        appletFrame.pack();
-
+        
         appletFrame.appletEventListener = new AppletEventListener(appletFrame, appletFrame);
         panel.addAppletListener(appletFrame.appletEventListener);
+         // Clear bindings, if any
+        if (applets.containsKey(identifier)) {
+            PluginAppletViewer oldFrame = applets.get(identifier);            
+            oldFrame.remove(panel);
+            panel.removeAppletListener(oldFrame.appletEventListener);
+        }
 
         appletsLock.lock();
         applets.put(identifier, appletFrame);
@@ -350,6 +367,7 @@
         appletsLock.unlock();
 
         PluginDebug.debug(panel, " framed");
+               return appletFrame;
     }
 
     /**
@@ -383,9 +401,107 @@
         };
 
         addWindowListener(windowEventListener);
+        final AppletPanel fPanel = panel;
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+
+                public void run() {
+                    add("Center", fPanel);
+                    fPanel.setVisible(false);
+
+                    splashPanel = SplashUtils.getSplashScreen(fPanel.getWidth(), fPanel.getHeight());
+                    if (splashPanel != null) {
+                        splashPanel.startAnimation();
+                        PluginDebug.debug("Added splash " + splashPanel);
+                        add("Center", splashPanel.getSplashComponent());
+                    }
+                    pack();
+                }
+            });
+        } catch (Exception e) {
+            e.printStackTrace(); // Not much we can do other and print
+        }
 
     }
 
+    public void replaceSplash(final SplashPanel newSplash) {
+        // Loading done. Remove splash screen.
+        if (splashPanel == null) {
+            return;
+        }
+        if (newSplash == null) {
+            removeSplash();
+            return;
+        }
+        splashPanel.stopAnimation();
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+
+                public void run() {
+                    splashPanel.getSplashComponent().setVisible(false);
+                    splashPanel.stopAnimation();
+                    remove(splashPanel.getSplashComponent());
+                    newSplash.setPercentage(splashPanel.getPercentage());
+                    newSplash.setPluginWidth(splashPanel.getPluginWidth());
+                    newSplash.setPluginHeight(splashPanel.getPluginHeight());
+                    newSplash.adjustForSize();
+                    splashPanel = newSplash;
+                    add("Center", splashPanel.getSplashComponent());
+                    pack();
+                }
+            });
+        } catch (Exception e) {
+            e.printStackTrace(); // Not much we can do other and print
+        }
+    }
+
+    @Override
+    public void removeSplash() {
+
+        // Loading done. Remove splash screen.
+        if (splashPanel == null) {
+            return;
+        }
+        splashPanel.stopAnimation();
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+
+                public void run() {
+                    splashPanel.getSplashComponent().setVisible(false);
+                    splashPanel.stopAnimation();
+                    remove(splashPanel.getSplashComponent());
+                    splashPanel = null;
+                    // Re-add the applet
+                    remove(panel);
+                    add(panel);
+                    panel.setVisible(true);
+                    pack();
+                }
+            });
+        } catch (Exception e) {
+            e.printStackTrace(); // Not much we can do other and print
+        }
+    }
+
+    @Override
+    public int getSplashWidth() {
+        if (splashPanel != null) {
+            return splashPanel.getPluginWidth();
+        } else {
+            return -1;
+        }
+    }
+
+    @Override
+    public int getSplashHeigth() {
+        if (splashPanel != null) {
+            return splashPanel.getPluginHeight();
+        } else {
+            return -1;
+        }
+    }
+   
+
     private static class AppletEventListener implements AppletListener {
         final Frame frame;
         final PluginAppletViewer appletViewer;
@@ -401,7 +517,6 @@
             panelLock.lock();
             panelLive.signalAll();
             panelLock.unlock();
-
             switch (evt.getID()) {
                 case AppletPanel.APPLET_RESIZE: {
                     if (src != null) {
@@ -436,6 +551,23 @@
 
                     break;
                 }
+                case AppletPanel.APPLET_START: {
+                    String s="Error1 detected";
+                    PluginDebug.debug(s);
+                    if (src.status != AppletPanel.APPLET_INIT && src.status != AppletPanel.APPLET_STOP) {
+                        SplashPanel sp=SplashUtils.getErrorSplashScreen(appletViewer.panel.getWidth(), appletViewer.panel.getHeight(), new Exception(s));
+                        appletViewer.replaceSplash(sp);
+                    }
+
+                    break;
+                }
+                case AppletPanel.APPLET_ERROR: {
+                    String s="Error2 detected";
+                    PluginDebug.debug(s);
+                        SplashPanel sp=SplashUtils.getErrorSplashScreen(appletViewer.panel.getWidth(), appletViewer.panel.getHeight(), new Exception(s));
+                        appletViewer.replaceSplash(sp);
+                    break;
+                }
             }
         }
     }
@@ -517,6 +649,8 @@
                 waitForAppletInit(applets.get(identifier).panel);
 
                 // Should we proceed with reframing?
+                 PluginDebug.debug("Init complete");
+
                 if (updateStatus(identifier, PAV_INIT_STATUS.REFRAME_COMPLETE).equals(PAV_INIT_STATUS.INACTIVE)) {
                     destroyApplet(identifier);
                     return;
@@ -656,6 +790,8 @@
      */
     public static void waitForAppletInit(NetxPanel panel) {
 
+        System.err.println("Waiting for applet init");
+
         // Wait till initialization finishes
         long maxTimeToSleep = APPLET_TIMEOUT;
 
@@ -2094,7 +2230,7 @@
      * the parent class's update() just does a couple of checks (both of
      * which are accounted for) and then calls paint anyway.
      */
-    public void update(Graphics g) {
+    public void paint(Graphics g) {
 
         // If the image or the graphics don't exist, create new ones
         if (bufFrameImg == null || bufFrameImgGraphics == null) {
@@ -2103,11 +2239,18 @@
         }
 
         // Paint off-screen
-        paint(bufFrameImgGraphics);
+        for (Component c: this.getComponents()) {
+                c.update(bufFrameImgGraphics);
+        }
 
         // Draw the painted image
         g.drawImage(bufFrameImg, 0, 0, this);
     }
+  
+    public void update(Graphics g) {
+        paint(g);
+    }
+
 
     /**
      * Waits on a given condition queue until timeout.
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashScreenTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashScreenTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,167 @@
+/* SplashScreenTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import java.awt.BorderLayout;
+import java.awt.event.ComponentEvent;
+import java.awt.event.ComponentListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.awt.image.BufferedImage;
+import javax.swing.JDialog;
+
+import net.sourceforge.jnlp.JNLPSplashScreen;
+import net.sourceforge.jnlp.splashscreen.parts.InfoItem;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ErrorSplashScreenTest extends JDialog {
+
+    static int width = JNLPSplashScreen.DEF_WIDTH;
+    static int height = JNLPSplashScreen.DEF_HEIGHT;
+    static SplashErrorPanel panel;
+
+    public ErrorSplashScreenTest() {
+
+        setSize(width - getInsets().left - getInsets().right, height - getInsets().bottom - getInsets().top);
+//   Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
+//    int x = (int) ((dimension.getWidth() - getWidth()) / 2);
+//    int y = (int) ((dimension.getHeight() - getHeight()) / 2);
+        //setLocation(x, y);
+        setLocationRelativeTo(null);
+        this.pack();
+        Exception ex = new Exception("Hi there");
+        panel = SplashUtils.getErrorSplashScreen(width, height, SplashUtils.SplashReason.JAVAWS, ex);
+        InformationElement ie = new InformationElement();
+        ie.setHomepage("http://someones.org/amazing?page");
+        ie.setTitle("Testing information title");
+        ie.setvendor("IcedTea-Web team");
+        ie.addDescription("Testing null description");
+        ie.addDescription("tsting twoline des ...break\ncription of kind short", InfoItem.descriptionKindShort);
+        panel.setInformationElement(ie);
+        panel.setVersion("1.2-re45fdg");
+        setLayout(new BorderLayout());
+        getContentPane().add(panel.getSplashComponent(), BorderLayout.CENTER);
+        addComponentListener(new ComponentListener() {
+
+            @Override
+            public void componentShown(ComponentEvent e) {
+            }
+
+            @Override
+            public void componentResized(ComponentEvent e) {
+                //panel.getSplashComponent().setSize(getWidth(), getHeight());
+                //panel.adjustForSize(getWidth(), getHeight());
+            }
+
+            @Override
+            public void componentMoved(ComponentEvent e) {
+            }
+
+            @Override
+            public void componentHidden(ComponentEvent e) {
+            }
+        });
+    }
+
+    @Test
+    public void splashScreenTestsExists() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        Assert.assertTrue(true);
+    }
+
+    @Test
+    public void splashScreenTestsPaint0() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(0);
+        panel.paint(buf.createGraphics());
+        //ImageFontCutterTest.save(buf,"e0");
+    }
+
+    @Test
+    public void splashScreenTestsPaint50() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(50);
+        panel.paint(buf.createGraphics());
+        // ImageFontCutterTest.save(buf,"e50");
+    }
+
+    @Test
+    public void splashScreenTestsPaint100() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(100);
+        panel.paint(buf.createGraphics());
+        //  ImageFontCutterTest.save(buf,"e100");
+    }
+
+    public static void main(String args[]) {
+        ErrorSplashScreenTest app = new ErrorSplashScreenTest();
+        app.setVisible(true);
+        app.addWindowListener(
+                new WindowAdapter() {
+
+                    @Override
+                    public void windowClosing(WindowEvent e) {
+                        System.exit(0);
+                    }
+                });
+        panel.setPercentage(30);
+        //panel.startAnimation();
+
+        try {
+            Thread.sleep(10000);
+        } catch (Exception e) {
+        }
+
+        panel.stopAnimation();
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashUtilsTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashUtilsTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,218 @@
+/* SplashUtils.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import java.util.HashMap;
+import java.util.Map;
+import net.sourceforge.jnlp.splashscreen.impls.*;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ErrorSplashUtilsTest {
+
+    private void fakeEnvironment(Map original) throws Exception {
+        SplashUtilsTest.fakeEnvironment(original);
+    }
+
+    private Map getEnvironment() throws Exception {
+        return SplashUtilsTest.getEnvironment();
+    }
+
+    private static final class JNLPSplashScreen {
+
+        static SplashPanel determineCallerTest() {
+            return SplashUtils.getErrorSplashScreen(100, 100, null);
+        }
+    }
+
+    @Test
+    public void determineCallerTest() {
+        SplashPanel p1 = SplashUtils.getErrorSplashScreen(100, 100, null);
+        Assert.assertEquals(SplashUtils.SplashReason.APPLET, p1.getSplashReason());
+        SplashPanel p2 = JNLPSplashScreen.determineCallerTest();
+        Assert.assertEquals(SplashUtils.SplashReason.JAVAWS, p2.getSplashReason());
+    }
+
+    @Test
+    public void testgetErrorSplashScreen1() throws Exception {
+        Map fake1 = new HashMap();
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, null);
+            Assert.assertTrue(sa instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, new Exception("oj"));
+            Assert.assertTrue(sw instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen2() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.DEFAULT);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, new Exception("oj"));
+            Assert.assertTrue(sa instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, null);
+            Assert.assertTrue(sw instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen3() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.NONE);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.DEFAULT);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, null);
+            Assert.assertTrue(sa instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, new Exception("oj"));
+            Assert.assertTrue(sw == null);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen4() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.NONE);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, new Exception("oj"));
+            Assert.assertTrue(sa == null);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, new Exception("oj"));
+            Assert.assertTrue(sw instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen5() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.NONE);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.NONE);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, null);
+            Assert.assertTrue(sa == null);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, null);
+            Assert.assertTrue(sw == null);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen6() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, "fgdthyfjtuk");
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, new Exception("oj"));
+            Assert.assertTrue(sa instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, new Exception("oj"));
+            Assert.assertTrue(sw instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen7() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, "egtrutkyukl");
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, null);
+            Assert.assertTrue(sa instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, null);
+            Assert.assertTrue(sw instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/SplashScreenTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/SplashScreenTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,185 @@
+/* SplashScreenTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import java.awt.BorderLayout;
+import java.awt.event.ComponentEvent;
+import java.awt.event.ComponentListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.awt.image.BufferedImage;
+import javax.swing.JDialog;
+
+import net.sourceforge.jnlp.JNLPSplashScreen;
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.ImageFontCutterTest;
+import net.sourceforge.jnlp.splashscreen.parts.InfoItem;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class SplashScreenTest extends JDialog {
+
+    static int width = JNLPSplashScreen.DEF_WIDTH;
+    static int height = JNLPSplashScreen.DEF_HEIGHT;
+    static SplashPanel panel;
+    private static boolean swap = true;
+
+    public SplashScreenTest() {
+
+        setSize(width - getInsets().left - getInsets().right, height - getInsets().bottom - getInsets().top);
+//   Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
+//    int x = (int) ((dimension.getWidth() - getWidth()) / 2);
+//    int y = (int) ((dimension.getHeight() - getHeight()) / 2);
+        //setLocation(x, y);
+        setLocationRelativeTo(null);
+        this.pack();
+        panel = SplashUtils.getSplashScreen(width, height, SplashUtils.SplashReason.JAVAWS);
+        InformationElement ie = new InformationElement();
+        ie.setHomepage("http://someones.org/amazing?page");
+        ie.setTitle("Testing information title");
+        ie.setvendor("IcedTea-Web team");
+        ie.addDescription("Testing null description");
+        ie.addDescription("tsting twoline des ...break\ncription of kind short", InfoItem.descriptionKindShort);
+        //panel.setInformationElement(ie);
+        //panel.setVersion("1.2-re45fdg");
+        setLayout(new BorderLayout());
+        getContentPane().add(panel.getSplashComponent(), BorderLayout.CENTER);
+
+        addComponentListener(new ComponentListener() {
+
+            @Override
+            public void componentShown(ComponentEvent e) {
+            }
+
+            @Override
+            public void componentResized(ComponentEvent e) {
+                //panel.getSplashComponent().setSize(getWidth(), getHeight());
+                //panel.adjustForSize(getWidth(), getHeight());
+            }
+
+            @Override
+            public void componentMoved(ComponentEvent e) {
+            }
+
+            @Override
+            public void componentHidden(ComponentEvent e) {
+            }
+        });
+    }
+
+    @Test
+    public void splashScreenTestsExists() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        Assert.assertTrue(true);
+    }
+
+    @Test
+    public void splashScreenTestsPaint0() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(0);
+        panel.paint(buf.createGraphics());
+        //   ImageFontCutterTest.save(buf,"s0");
+    }
+
+    @Test
+    public void splashScreenTestsPaint50() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(50);
+        panel.paint(buf.createGraphics());
+        //  ImageFontCutterTest.save(buf,"s50");
+    }
+
+    @Test
+    public void splashScreenTestsPaint100() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(100);
+        panel.paint(buf.createGraphics());
+        // ImageFontCutterTest.save(buf,"s100");
+    }
+
+    public static void main(String args[]) {
+        SplashScreenTest app = new SplashScreenTest();
+        app.setVisible(true);
+
+        app.addWindowListener(
+                new WindowAdapter() {
+
+                    @Override
+                    public void windowClosing(WindowEvent e) {
+                        System.exit(0);
+                    }
+                });
+
+        panel.startAnimation();
+
+        try {
+            Thread.sleep(5000);
+        } catch (Exception e) {
+        }
+        //not needed
+        //panel.stopAnimation();
+        if (swap) {
+            SplashErrorPanel r = SplashUtils.getErrorSplashScreen(panel.getPluginWidth(), panel.getPluginHeight(), SplashUtils.SplashReason.JAVAWS, null);
+            app.remove(panel.getSplashComponent());
+            r.setPercentage(panel.getPercentage());
+            r.adjustForSize();
+            panel = r;
+            app.add(panel.getSplashComponent());
+            app.validateTree();
+            //app.pack();
+            //app.setVisible(true);
+            try {
+                Thread.sleep(10000);
+            } catch (Exception e) {
+            }
+        }
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/SplashUtilsTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/SplashUtilsTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,253 @@
+/* SplashUtils.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import java.lang.reflect.Field;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
+import net.sourceforge.jnlp.splashscreen.impls.*;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class SplashUtilsTest {
+
+
+
+    @Test
+    public void determineCallerTest() {
+        modifyRuntime(false);
+        SplashPanel p1 = SplashUtils.getSplashScreen(100, 100);
+        Assert.assertEquals(SplashUtils.SplashReason.APPLET, p1.getSplashReason());
+        modifyRuntime(true);
+        SplashPanel p2 = SplashUtils.getSplashScreen(100, 100);
+        Assert.assertEquals(SplashUtils.SplashReason.JAVAWS, p2.getSplashReason());
+    }
+
+    public static Map<String, String> getEnvironment() throws Exception {
+        Class[] classes = Collections.class.getDeclaredClasses();
+        Map<String, String> env = System.getenv();
+        for (Class cl : classes) {
+            if ("java.util.Collections$UnmodifiableMap".equals(cl.getName())) {
+                Field field = cl.getDeclaredField("m");
+                field.setAccessible(true);
+                Object obj = field.get(env);
+                Map<String, String> map = (Map<String, String>) obj;
+                return map;
+            }
+        }
+        return null;
+    }
+
+    public static void fakeEnvironment(Map<String, String> newenv) throws Exception {
+        Class[] classes = Collections.class.getDeclaredClasses();
+        Map<String, String> env = System.getenv();
+        for (Class cl : classes) {
+            if ("java.util.Collections$UnmodifiableMap".equals(cl.getName())) {
+                Field field = cl.getDeclaredField("m");
+                field.setAccessible(true);
+                Object obj = field.get(env);
+                Map<String, String> map = (Map<String, String>) obj;
+                map.clear();
+                map.putAll(newenv);
+            }
+        }
+    }
+
+    @Test
+    public void testGetSplashScreen1() throws Exception {
+        Map fake1 = new HashMap();
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testGetSplashScreen2() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.DEFAULT);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+
+    @Test
+    public void testGetSplashScreen3() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.NONE);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.DEFAULT);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw == null);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testGetSplashScreen4() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.NONE);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa == null);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testGetSplashScreen5() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.NONE);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.NONE);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa == null);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw == null);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+    }
+
+    @Test
+    public void testGetSplashScreen6() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, "fgdthyfjtuk");
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+
+    @Test
+    public void testGetSplashScreen7() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, "egtrutkyukl");
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+
+    private static void modifyRuntime(boolean b) {
+        try{
+        setStatic(JNLPRuntime.class.getDeclaredField("isWebstartApplication"), b);
+        }catch(Exception ex){
+            throw new RuntimeException(ex);
+        }
+    }
+   private  static void setStatic(Field field, Object newValue) throws Exception {
+      field.setAccessible(true);
+      field.set(null, newValue);
+   }
+
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,108 @@
+/* BasePainterTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.BasePainter;
+import java.awt.image.BufferedImage;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.impls.DefaultSplashScreen2012;
+import org.junit.Assert;
+
+
+import org.junit.Test;
+
+public class BasePainterTest {
+
+    @Test
+    public void scaleTest() {
+        Assert.assertEquals(10, BasePainter.scale(2, 4, 5), 0.1d);
+        Assert.assertEquals(4, BasePainter.scale(4, 2, 8), 0.1d);
+    }
+
+    @Test
+    public void getRatioTest() {
+        Assert.assertEquals(2, BasePainter.getRatio(2, 4), 0.1d);
+        Assert.assertEquals(0.5, BasePainter.getRatio(4, 2), 0.1d);
+    }
+
+    @Test
+    public void incLevel2Test() {
+        BasePainter bp = new BasePainter(new DefaultSplashScreen2012(100, 100, SplashReason.APPLET));
+        int l1 = bp.getWaterLevel();
+        int l2 = bp.getAnimationsPosition();
+        bp.increaseAnimationPosition();
+        Assert.assertFalse(l2 == bp.getAnimationsPosition());
+        Assert.assertTrue(l1 == bp.getWaterLevel());
+    }
+
+    @Test
+    public void adjustForSizeTest() {
+        BasePainter bp = new BasePainter(new DefaultSplashScreen2012(100, 100, SplashReason.APPLET));
+        bp.adjustForSize(100, 100);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        BufferedImage i1 = bp.prerenderStill();
+        Assert.assertEquals(100, i1.getWidth());
+        Assert.assertEquals(100, i1.getHeight());
+        bp.adjustForSize(20, 20);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        Assert.assertEquals(20, bp.prerenderedStuff.getWidth());
+        Assert.assertEquals(20, bp.prerenderedStuff.getHeight());
+        Assert.assertFalse(i1.getWidth() == bp.prerenderedStuff.getWidth());
+        Assert.assertFalse(i1.getHeight() == bp.prerenderedStuff.getHeight());
+
+
+    }
+
+    @Test
+    public void adjustForSizeTest2() {
+        BasePainter bp = new BasePainter(new DefaultSplashScreen2012(0, 0, SplashReason.APPLET), false);
+        Assert.assertNull(bp.prerenderedStuff);
+        bp.master.setPluginHeight(10);
+        bp.master.setPluginWidth(10);
+        BufferedImage i1 = bp.prerenderStill();
+        Assert.assertEquals(10, i1.getWidth());
+        Assert.assertEquals(10, i1.getHeight());
+        bp.adjustForSize(20, 20);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        Assert.assertEquals(20, bp.prerenderedStuff.getWidth());
+        Assert.assertEquals(20, bp.prerenderedStuff.getHeight());
+        Assert.assertFalse(i1.getWidth() == bp.prerenderedStuff.getWidth());
+        Assert.assertFalse(i1.getHeight() == bp.prerenderedStuff.getHeight());
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurveTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurveTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,307 @@
+/* ControlCurveTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+/** This class represents a curve defined by a sequence of control points */
+/*  Part of NatCubic implementation, inspire by http://www.cse.unsw.edu.au/~lambert/*/
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.ControlCurve;
+import java.awt.*;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ControlCurveTest {
+
+    @Test
+    public void setGetTests() {
+        Polygon p1 = new Polygon();
+        Polygon p2 = new Polygon();
+        Polygon p3 = new Polygon();
+        ControlCurve cc = new ControlCurve();
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setSourcePolygon(p1);
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertEquals(p1, cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setWithPoints(false);
+        Assert.assertFalse(cc.isWithPoints());
+
+        cc = new ControlCurve(p2);
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertEquals(p2, cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setWithPoints(false);
+        Assert.assertFalse(cc.isWithPoints());
+        cc.setSourcePolygon(p3);
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertEquals(p3, cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setWithPoints(false);
+        Assert.assertFalse(cc.isWithPoints());
+        cc.setWithPoints(true);
+        Assert.assertTrue(cc.isWithPoints());
+
+    }
+
+    @Test
+    public void sqrTest() {
+        Assert.assertEquals(25, ControlCurve.sqr(5));
+    }
+    static int[] xs = {0, 100, 100, 0};
+    static int[] ys = {0, 0, 100, 1000};
+
+    static ControlCurve getTestInstance() {
+        ControlCurve cc = new ControlCurve();
+        cc.addPoint(xs[0], ys[0]);
+        cc.addPoint(xs[1], ys[1]);
+        cc.addPoint(xs[2], ys[2]);
+        cc.addPoint(xs[3], ys[3]);
+        return cc;
+
+    }
+
+    @Test
+    public void selectPointTest() {
+        ControlCurve cc = getTestInstance();
+        int i = cc.selectPoint(-50, -50);
+        Assert.assertEquals(-1, i);
+        i = cc.selectPoint(-3, 3);
+        Assert.assertEquals(0, i);
+        i = cc.selectPoint(97, 97);
+        Assert.assertEquals(2, i);
+        i = cc.selectPoint(100, 50);
+        Assert.assertEquals(-1, i);
+    }
+
+    @Test
+    public void addPoint() {
+        ControlCurve cc = new ControlCurve();
+        Assert.assertEquals(0, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(1, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(2, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(100, 100);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+    }
+
+    @Test
+    public void setPointTest1() {
+        ControlCurve cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(4);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(3);
+        cc.setPoint(10, 20);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        Assert.assertEquals(20, cc.getSourcePolygon().ypoints[3]);
+        Assert.assertEquals(10, cc.getSourcePolygon().xpoints[3]);
+    }
+
+    @Test
+    public void setPointTest2() {
+        ControlCurve cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setPoint(-1, 10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.setPoint(4, 10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.setPoint(3, 10, 20);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        Assert.assertEquals(20, cc.getSourcePolygon().ypoints[3]);
+        Assert.assertEquals(10, cc.getSourcePolygon().xpoints[3]);
+
+    }
+
+    @Test
+    public void removePoint2() {
+        ControlCurve cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.removePoint(-1);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.removePoint(4);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.removePoint(3);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+
+    }
+
+    public void removePoint1() {
+        ControlCurve cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(4);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(0);
+        cc.removePoint();
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i + 1], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i + 1], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/CubicTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/CubicTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,57 @@
+/* CubicTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.Cubic;
+import org.junit.Assert;
+import org.junit.Test;
+
+/** this class represents a cubic polynomial */
+/*  Part of NatCubic implementation, inspire by http://www.cse.unsw.edu.au/~lambert/*/
+public class CubicTest {
+
+    @Test
+    public void cubicTest() {
+        Cubic c1 = new Cubic(1, 2, 3, 4);
+        Assert.assertTrue(new Float(1).equals(c1.a));
+        Assert.assertTrue(new Float(2).equals(c1.b));
+        Assert.assertTrue(new Float(3).equals(c1.c));
+        Assert.assertTrue(new Float(4).equals(c1.d));
+        Assert.assertTrue(new Float(586).equals(c1.eval(5)));
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainterTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainterTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,113 @@
+/* ErrorPainterTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.ErrorPainter;
+import java.awt.Color;
+import java.awt.image.BufferedImage;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.impls.DefaultSplashScreen2012;
+import org.junit.Assert;
+import org.junit.Test;
+
+public final class ErrorPainterTest {
+
+    @Test
+    public void interpolTest() {
+        Assert.assertEquals(15, ErrorPainter.interpol(4, 2, 10, 20), 0.1d);
+        Assert.assertEquals(-15, ErrorPainter.interpol(4, 2, -20, -10), 0.1d);
+        Assert.assertEquals(30, ErrorPainter.interpol(2, 4, 10, 20), 0.1d);
+    }
+
+    @Test
+    public void interpolColorTest() {
+        Color c1 = new Color(0, 0, 0);
+        Color c2 = new Color(200, 200, 200);
+        Color c3 = new Color(100, 100, 100);
+        Color c4 = ErrorPainter.interpolColor(4, 2, c1, c2);
+        Assert.assertEquals(c3, c4);
+
+    }
+
+//    public static void main(String[] a) {
+//        Color c1 = new Color(250, 50, 0, 50);
+//        Color c2 = new Color(0, 0, 250, 100);
+//        for (int i = 0; i < 21; i++) {
+//            Color q = ErrorPainter.interpolColor(20, i, c1, c2);
+//            System.out.println(q.toString());
+//            System.out.println(q.getAlpha());
+//        }
+//    }
+    @Test
+    public void adjustForSizeTest() {
+        ErrorPainter bp = new ErrorPainter(new DefaultSplashScreen2012(100, 100, SplashReason.APPLET));
+        bp.master.setPluginHeight(100);
+        bp.master.setPluginWidth(100);
+        bp.adjustForSize(100, 100);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        BufferedImage i1 = bp.prerenderStill();
+        Assert.assertEquals(100, i1.getWidth());
+        Assert.assertEquals(100, i1.getHeight());
+        bp.adjustForSize(20, 20);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        Assert.assertEquals(20, bp.prerenderedStuff.getWidth());
+        Assert.assertEquals(20, bp.prerenderedStuff.getHeight());
+        Assert.assertFalse(i1.getWidth() == bp.prerenderedStuff.getWidth());
+        Assert.assertFalse(i1.getHeight() == bp.prerenderedStuff.getHeight());
+
+
+    }
+
+    @Test
+    public void adjustForSizeTest2() {
+        ErrorPainter bp = new ErrorPainter(new DefaultSplashScreen2012(0, 0, SplashReason.APPLET), false);
+        Assert.assertNull(bp.prerenderedStuff);
+        bp.master.setPluginHeight(10);
+        bp.master.setPluginWidth(10);
+        BufferedImage i1 = bp.prerenderStill();
+        Assert.assertEquals(10, i1.getWidth());
+        Assert.assertEquals(10, i1.getHeight());
+        bp.adjustForSize(20, 20);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        Assert.assertEquals(20, bp.prerenderedStuff.getWidth());
+        Assert.assertEquals(20, bp.prerenderedStuff.getHeight());
+        Assert.assertFalse(i1.getWidth() == bp.prerenderedStuff.getWidth());
+        Assert.assertFalse(i1.getHeight() == bp.prerenderedStuff.getHeight());
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ImageFontCutterTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ImageFontCutterTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,127 @@
+/* ImageFontCutterTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import javax.imageio.ImageIO;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ImageFontCutterTest {
+
+    @Test
+    public void getSetTest() {
+        BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bi.createGraphics();
+        Font f1 = g2d.getFont().deriveFont(Font.ITALIC);
+        Font f2 = g2d.getFont().deriveFont(Font.BOLD);
+        String s = "Hello";
+        ImageFontCutter ifc = new ImageFontCutter(f1, s);
+        Assert.assertEquals(-1, ifc.getHeight());
+        Assert.assertEquals(-1, ifc.getWidth());
+        Assert.assertEquals(f1, ifc.getFont());
+        Assert.assertNull(ifc.getImg());
+        Assert.assertEquals(s, ifc.getText());
+        Assert.assertEquals(Color.BLACK, ifc.getTextOutline());
+        ifc.setImg(bi);
+        Assert.assertEquals(100, ifc.getHeight());
+        Assert.assertEquals(100, ifc.getWidth());
+        Assert.assertEquals(f1, ifc.getFont());
+        Assert.assertEquals(bi, ifc.getImg());
+        Assert.assertEquals(s, ifc.getText());
+        Assert.assertEquals(Color.BLACK, ifc.getTextOutline());
+
+        ImageFontCutter xfc = new ImageFontCutter(f1, s, Color.red);
+        xfc.setImg(bi);
+        xfc.setFont(f2);
+        String ss = "HelloHello";
+        Assert.assertEquals(100, xfc.getHeight());
+        Assert.assertEquals(100, xfc.getWidth());
+        Assert.assertEquals(f2, xfc.getFont());
+        Assert.assertEquals(bi, xfc.getImg());
+        Assert.assertEquals(s, xfc.getText());
+        Assert.assertEquals(Color.red, xfc.getTextOutline());
+        xfc.setTextOutline(Color.white);
+        Assert.assertEquals(Color.white, xfc.getTextOutline());
+
+    }
+
+    @Test
+    public void cutToTest() {
+        BufferedImage bi1 = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d1 = bi1.createGraphics();
+        g2d1.setColor(Color.red);
+        g2d1.fillRect(0, 0, 100, 100);
+
+
+        BufferedImage bi2 = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d2 = bi2.createGraphics();
+        g2d2.setColor(Color.blue);
+        g2d2.fillRect(0, 0, 100, 100);
+        ImageFontCutter ifc = new ImageFontCutter(g2d1.getFont().deriveFont(Font.BOLD, 130), "O");
+        ifc.setImg(bi1);
+        ifc.cutTo(g2d2, -5, 100);
+        Color c1 = new Color(bi2.getRGB(1, 1));
+        Assert.assertEquals(Color.blue, c1);
+        Color c2 = new Color(bi2.getRGB(50, 50));
+        Assert.assertEquals(Color.blue, c2);
+        Color c3 = new Color(bi2.getRGB(30, 30));
+        Assert.assertEquals(Color.red, c3);
+        Color c4 = new Color(bi2.getRGB(70, 70));
+        Assert.assertEquals(Color.red, c4);
+        Color c5 = new Color(bi2.getRGB(26, 52));
+        Assert.assertEquals(Color.black, c5);
+
+
+    }
+
+    public static void save(BufferedImage bi1, String string) {
+        try {
+            String name = string;
+            if (name == null || name.trim().length() <= 0) {
+                name = "testImage";
+            }
+            ImageIO.write(bi1, "png", new File(System.getProperty("user.home") + "/Desktop/" + name + ".png"));
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingTextTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingTextTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,151 @@
+/* MovingTextTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.MovingText;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class MovingTextTest {
+
+    @Test
+    public void setGetTest() {
+        BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bi.createGraphics();
+        Font f1 = g2d.getFont().deriveFont(Font.ITALIC);
+        Font f2 = g2d.getFont().deriveFont(Font.BOLD);
+        String s = "Watter";
+        MovingText tw = new MovingText(s, f1);
+        Assert.assertEquals(-1, tw.getHeight());
+        Assert.assertEquals(-1, tw.getWidth());
+        Assert.assertEquals(f1, tw.getFont());
+        Assert.assertNull(tw.getImg());
+        Assert.assertEquals(s, tw.getText());
+        Assert.assertEquals(Color.BLACK, tw.getTextOutline());
+        Assert.assertEquals(Color.blue, tw.getWaterColor());
+        Assert.assertEquals(Color.white, tw.getBgColor());
+        Assert.assertEquals(0, tw.getPercentageOfWater());
+        tw.setBgColor(Color.yellow);
+        tw.setWaterColor(Color.orange);
+        tw.setPercentageOfWater(20);
+        Assert.assertEquals(Color.orange, tw.getWaterColor());
+        Assert.assertEquals(Color.yellow, tw.getBgColor());
+        Assert.assertEquals(20, tw.getPercentageOfWater());
+
+    }
+
+    private static int getAvgColor(Color c) {
+        Assert.assertEquals(c.getRed(), c.getBlue());
+        Assert.assertEquals(c.getRed(), c.getGreen());
+        return c.getRed();
+    }
+
+    private static int getAvgColor(int i) {
+        return getAvgColor(new Color(i));
+    }
+
+    private static int getAvgColor(BufferedImage m, int x, int y) {
+        return getAvgColor(m.getRGB(x, y));
+    }
+
+    @Test
+    public void getBackground() {
+        MovingText ifc = getInstance();
+        BufferedImage bic = ifc.getBackground();
+        int w = bic.getWidth();
+        int h = bic.getHeight();
+        ifc.setPercentageOfWater(0);
+        bic = ifc.getBackground();
+        Assert.assertTrue(getAvgColor(bic, 3 * w / 4, h / 2) > getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertTrue(getAvgColor(bic, w / 4, h / 2) < getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertEquals(new Color(bic.getRGB(w - w / 4, 2 * h / 3)), new Color(bic.getRGB(w - w / 4, h / 3)));
+        ifc.setPercentageOfWater(w / 2);
+        bic = ifc.getBackground();
+        Assert.assertTrue(getAvgColor(bic, 3 * w / 4, h / 2) > getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertTrue(getAvgColor(bic, w / 4, h / 2) > getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertEquals(new Color(bic.getRGB(w - w / 3, 2 * h / 3)), new Color(bic.getRGB(w - w / 3, h / 3)));
+        ifc.setPercentageOfWater(w);
+        bic = ifc.getBackground();
+        Assert.assertTrue(getAvgColor(bic, 3 * w / 4, h / 2) < getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertTrue(getAvgColor(bic, w / 4, h / 2) > getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertEquals(new Color(bic.getRGB(w - w / 4, h / 3)), new Color(bic.getRGB(w - w / 4, h / 2)));
+
+
+
+    }
+
+    private MovingText getInstance() {
+        BufferedImage bi1 = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+        Font f = bi1.createGraphics().getFont().deriveFont(Font.BOLD, 130);
+        MovingText ifc = new MovingText("O O", f);
+        return ifc;
+    }
+
+    private static void assertNotEquals(Object o1, Object o2) {
+        Assert.assertFalse(o1.equals(o2));
+
+    }
+
+    @Test
+    public void cutToTest() {
+        MovingText ifc = getInstance();
+        BufferedImage bic = ifc.getBackground();
+        int w = bic.getWidth();
+        int h = bic.getHeight();
+        bic = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        ifc.cutTo(bic.createGraphics(), 0, h);
+        Color cc = new Color(0, 0, 0);
+        assertNotEquals(cc, new Color(bic.getRGB(52, 142)));
+        assertNotEquals(cc, new Color(bic.getRGB(170, 110)));
+        assertNotEquals(cc, new Color(bic.getRGB(52, 62)));
+        assertNotEquals(cc, new Color(bic.getRGB(245, 85)));
+
+        //well this should be acctually rgba 0,0,0,0 but somehow this was no passig
+        //you can confirm with:
+        //ImageFontCutterTest.save(bic, "halfFiledOus")
+        Assert.assertEquals(cc, new Color(bic.getRGB(137, 127)));
+        Assert.assertEquals(cc, new Color(bic.getRGB(137, 2)));
+
+
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosedTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosedTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,264 @@
+/* NatCubicClosedTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.NatCubicClosed;
+import java.awt.Polygon;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class NatCubicClosedTest {
+
+    @Test
+    public void setGetTests() {
+        Polygon p1 = new Polygon();
+        p1.addPoint(10, 23);
+        p1.addPoint(12, -31);
+        NatCubicClosed cc = new NatCubicClosed();
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        Exception ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setSourcePolygon(p1);
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertEquals(p1, cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setWithPoints(false);
+        Assert.assertFalse(cc.isWithPoints());
+        cc.resetResult();
+        Assert.assertNull(cc.getResult());
+
+
+
+    }
+    static int[] xs = {0, 100, 100, 0};
+    static int[] ys = {0, 0, 100, 1000};
+
+    static NatCubicClosed getTestInstance() {
+        NatCubicClosed cc = new NatCubicClosed();
+        cc.addPoint(xs[0], ys[0]);
+        cc.addPoint(xs[1], ys[1]);
+        cc.addPoint(xs[2], ys[2]);
+        cc.addPoint(xs[3], ys[3]);
+        return cc;
+
+    }
+
+    @Test
+    public void basicComputation() {
+        NatCubicClosed b = new NatCubicClosed();
+        b.addPoint(10, 10);
+        b.addPoint(50, 20);
+        b.addPoint(-10, -10);
+        b.calcualteAndSaveResult();
+        Assert.assertTrue(b.pts.npoints < b.result.npoints / 5);
+        Assert.assertEquals(b.result.xpoints[0], b.result.xpoints[b.result.npoints - 1]);
+        Assert.assertEquals(b.result.ypoints[0], b.result.ypoints[b.result.npoints - 1]);
+
+    }
+
+    @Test
+    public void addPoint() {
+        NatCubicClosed cc = new NatCubicClosed();
+        Assert.assertEquals(0, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        Exception ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(1, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(2, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.addPoint(100, 100);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+    }
+
+    @Test
+    public void setPointTest1() {
+        NatCubicClosed cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(4);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(3);
+        cc.setPoint(10, 20);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        Assert.assertEquals(20, cc.getSourcePolygon().ypoints[3]);
+        Assert.assertEquals(10, cc.getSourcePolygon().xpoints[3]);
+    }
+
+    @Test
+    public void removePoint2() {
+        NatCubicClosed cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(-1);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(4);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(3);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+
+    }
+
+    public void removePoint1() {
+        NatCubicClosed cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(4);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(0);
+        cc.removePoint();
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i + 1], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i + 1], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,264 @@
+/* NatCubicTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.NatCubic;
+import java.awt.Polygon;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class NatCubicTest {
+
+    @Test
+    public void setGetTests() {
+        Polygon p1 = new Polygon();
+        p1.addPoint(10, 23);
+        p1.addPoint(12, -31);
+        NatCubic cc = new NatCubic();
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        Exception ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setSourcePolygon(p1);
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertEquals(p1, cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setWithPoints(false);
+        Assert.assertFalse(cc.isWithPoints());
+        cc.resetResult();
+        Assert.assertNull(cc.getResult());
+
+
+
+    }
+    static int[] xs = {0, 100, 100, 0};
+    static int[] ys = {0, 0, 100, 1000};
+
+    static NatCubic getTestInstance() {
+        NatCubic cc = new NatCubic();
+        cc.addPoint(xs[0], ys[0]);
+        cc.addPoint(xs[1], ys[1]);
+        cc.addPoint(xs[2], ys[2]);
+        cc.addPoint(xs[3], ys[3]);
+        return cc;
+
+    }
+
+    @Test
+    public void basicComputation() {
+        NatCubic b = new NatCubic();
+        b.addPoint(10, 10);
+        b.addPoint(50, 20);
+        b.addPoint(-10, -10);
+        b.calcualteAndSaveResult();
+        Assert.assertTrue(b.pts.npoints < b.result.npoints / 5);
+        Assert.assertFalse(b.result.xpoints[0] == b.result.xpoints[b.result.npoints - 1]);
+        Assert.assertFalse(b.result.ypoints[0] == b.result.ypoints[b.result.npoints - 1]);
+
+    }
+
+    @Test
+    public void addPoint() {
+        NatCubic cc = new NatCubic();
+        Assert.assertEquals(0, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        Exception ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(1, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(2, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.addPoint(100, 100);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+    }
+
+    @Test
+    public void setPointTest1() {
+        NatCubic cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(4);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(3);
+        cc.setPoint(10, 20);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        Assert.assertEquals(20, cc.getSourcePolygon().ypoints[3]);
+        Assert.assertEquals(10, cc.getSourcePolygon().xpoints[3]);
+    }
+
+    @Test
+    public void removePoint2() {
+        NatCubic cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(-1);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(4);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(3);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+
+    }
+
+    public void removePoint1() {
+        NatCubic cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(4);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(0);
+        cc.removePoint();
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i + 1], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i + 1], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefsTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefsTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,91 @@
+/* SplinesDefsTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.SplinesDefs;
+import java.awt.Point;
+import java.awt.Polygon;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class SplinesDefsTest {
+
+    private static Point[] testArray = {
+        new Point(0, 0),
+        new Point(100, 0),
+        new Point(100, 100),
+        new Point(0, 100)
+    };
+
+    @Test
+    public void polygonizeControlPointsTest() {
+
+        Polygon p = SplinesDefs.polygonizeControlPoints(testArray, 1d, 1d);
+        Assert.assertTrue(p.contains(50, 50));
+        Assert.assertFalse(p.contains(150, 150));
+        Assert.assertFalse(p.contains(-50, -50));
+        p = SplinesDefs.polygonizeControlPoints(testArray, 0.5d, 0.5d);
+        Assert.assertTrue(p.contains(20, 20));
+        Assert.assertFalse(p.contains(75, 75));
+        Assert.assertFalse(p.contains(-25, -25));
+        p = SplinesDefs.polygonizeControlPoints(testArray, 2d, 2d);
+        Assert.assertTrue(p.contains(150, 150));
+        Assert.assertFalse(p.contains(250, 250));
+        Assert.assertFalse(p.contains(-50, -50));
+
+
+    }
+
+    @Test
+    public void testApi() {
+        double x = 1d;
+        Polygon[] p = {SplinesDefs.getMainLeaf(x, x),
+            SplinesDefs.getMainLeafCurve(x, x),
+            SplinesDefs.getMainLeafStalk(x, x),
+            SplinesDefs.getMainLeafStalkCurve(x, x),
+            SplinesDefs.getSecondLeaf(x, x),
+            SplinesDefs.getSecondLeafCurve(x, x),
+            SplinesDefs.getSecondLeafStalk(x, x),
+            SplinesDefs.getSecondLeafStalkCurve(x, x)};
+        for (Polygon polygon : p) {
+            Assert.assertNotNull(polygon);
+            Assert.assertTrue(polygon.npoints > 5);
+
+        }
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevelTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevelTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,131 @@
+/* TextWithWaterLevelTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.TextWithWaterLevel;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TextWithWaterLevelTest {
+
+    @Test
+    public void setGetTest() {
+        BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bi.createGraphics();
+        Font f1 = g2d.getFont().deriveFont(Font.ITALIC);
+        Font f2 = g2d.getFont().deriveFont(Font.BOLD);
+        String s = "Watter";
+        TextWithWaterLevel tw = new TextWithWaterLevel(s, f1);
+        Assert.assertEquals(-1, tw.getHeight());
+        Assert.assertEquals(-1, tw.getWidth());
+        Assert.assertEquals(f1, tw.getFont());
+        Assert.assertNull(tw.getImg());
+        Assert.assertEquals(s, tw.getText());
+        Assert.assertEquals(Color.BLACK, tw.getTextOutline());
+        Assert.assertEquals(Color.blue, tw.getWaterColor());
+        Assert.assertEquals(Color.white, tw.getBgColor());
+        Assert.assertEquals(0, tw.getPercentageOfWater());
+        tw.setBgColor(Color.yellow);
+        tw.setWaterColor(Color.orange);
+        tw.setPercentageOfWater(20);
+        Assert.assertEquals(Color.orange, tw.getWaterColor());
+        Assert.assertEquals(Color.yellow, tw.getBgColor());
+        Assert.assertEquals(20, tw.getPercentageOfWater());
+
+    }
+
+    @Test
+    public void getBackground() {
+        TextWithWaterLevel ifc = getInstance();
+        ifc.setCachedPolygon(null);
+        ifc.setPercentageOfWater(50);
+        BufferedImage bic = ifc.getBackground();
+        int w = bic.getWidth();
+        int h = bic.getHeight();
+        Assert.assertEquals(Color.blue, new Color(bic.getRGB(w / 2, 2 * h / 3)));
+        Assert.assertEquals(Color.white, new Color(bic.getRGB(w / 2, h / 3)));
+        ifc.setCachedPolygon(null);
+        ifc.setPercentageOfWater(5);
+        bic = ifc.getBackground();
+        Assert.assertEquals(Color.white, new Color(bic.getRGB(w / 2, 2 * h / 3)));
+        Assert.assertEquals(Color.white, new Color(bic.getRGB(w / 2, h / 3)));
+        ifc.setCachedPolygon(null);
+        ifc.setPercentageOfWater(95);
+        bic = ifc.getBackground();
+        Assert.assertEquals(Color.blue, new Color(bic.getRGB(w / 2, 2 * h / 3)));
+        Assert.assertEquals(Color.blue, new Color(bic.getRGB(w / 2, h / 3)));
+
+
+
+    }
+
+    private TextWithWaterLevel getInstance() {
+        BufferedImage bi1 = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+        Font f = bi1.createGraphics().getFont().deriveFont(Font.BOLD, 130);
+        TextWithWaterLevel ifc = new TextWithWaterLevel("O O", f);
+        return ifc;
+    }
+
+    @Test
+    public void cutToTest() {
+        TextWithWaterLevel ifc = getInstance();
+        ifc.setPercentageOfWater(50);
+        BufferedImage bic = ifc.getBackground();
+        int w = bic.getWidth();
+        int h = bic.getHeight();
+        bic = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        ifc.cutTo(bic.createGraphics(), 0, h);
+        Assert.assertEquals(Color.blue, new Color(bic.getRGB(52, 142)));
+        Assert.assertEquals(Color.blue, new Color(bic.getRGB(170, 110)));
+        Assert.assertEquals(Color.white, new Color(bic.getRGB(52, 62)));
+        Assert.assertEquals(Color.white, new Color(bic.getRGB(245, 85)));
+
+        //well this should be acctually rgba 0,0,0,0 but somehow this was no passig
+        //you can confirm with:
+        //ImageFontCutterTest.save(bic, "halfFiledOus")
+        Assert.assertEquals(new Color(0, 0, 0), new Color(bic.getRGB(137, 127)));
+        Assert.assertEquals(new Color(0, 0, 0), new Color(bic.getRGB(137, 2)));
+
+
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreenTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreenTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,127 @@
+/* BasicComponentSplashScreenTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.awt.Graphics;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class BasicComponentErrorSplashScreenTest {
+
+    @Test
+    public void createAditionalInfoTest() {
+        BasicComponentSplashScreenImpl tested = new BasicComponentSplashScreenImpl();
+        String v = "2.118x08";
+        tested.setVersion(v);
+        tested.setSplashReason(SplashReason.APPLET);
+        String s1 = tested.createAditionalInfoTest();
+        Assert.assertNotNull("Not null input must result to something", s1);
+        Assert.assertTrue("Not null input must have version value", s1.contains(v));
+        Assert.assertTrue("Not null input must have version string", s1.contains("version"));
+        Assert.assertTrue("Not null input must have version string", s1.contains(SplashReason.APPLET.toString()));
+        tested.setVersion(null);
+        tested.setSplashReason(null);
+        String s2 = tested.createAditionalInfoTest();
+        Assert.assertNull("Not null input must result to something", s2);
+        tested.setSplashReason(null);
+        tested.setVersion(v);
+        Exception ex = null;
+        try {
+            String s3 = tested.createAditionalInfoTest();
+        } catch (Exception exx) {
+            ex = exx;
+        }
+        Assert.assertNotNull("Null reason vith set version must causes exception", ex);
+
+
+    }
+
+    @Test
+    public void setGetError() {
+        BasicComponentSplashScreenImpl tested = new BasicComponentSplashScreenImpl();
+        Exception ex = new Exception("ujuj");
+        tested.setLoadingException(ex);
+        Assert.assertEquals(ex, tested.getLoadingException());
+
+    }
+
+    private class BasicComponentSplashScreenImpl extends BasicComponentErrorSplashScreen {
+
+        public BasicComponentSplashScreenImpl() {
+        }
+
+        @Override
+        public void paintComponent(Graphics g) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void paint(Graphics g) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void adjustForSize() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void startAnimation() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void stopAnimation() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        public String createAditionalInfoTest() {
+            return super.createAditionalInfo();
+        }
+
+        @Override
+        public void setPercentage(int done) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public int getPercentage() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreenTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreenTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,118 @@
+/* BasicComponentSplashScreenTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.awt.Graphics;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class BasicComponentSplashScreenTest {
+
+    @Test
+    public void createAditionalInfoTest() {
+        BasicComponentSplashScreenImpl tested = new BasicComponentSplashScreenImpl();
+        String v = "2.118x08";
+        tested.setVersion(v);
+        tested.setSplashReason(SplashReason.APPLET);
+        String s1 = tested.createAditionalInfoTest();
+        Assert.assertNotNull("Not null input must result to something", s1);
+        Assert.assertTrue("Not null input must have version value", s1.contains(v));
+        Assert.assertTrue("Not null input must have version string", s1.contains("version"));
+        Assert.assertTrue("Not null input must have version string", s1.contains(SplashReason.APPLET.toString()));
+        tested.setVersion(null);
+        tested.setSplashReason(null);
+        String s2 = tested.createAditionalInfoTest();
+        Assert.assertNull("Not null input must result to something", s2);
+        tested.setSplashReason(null);
+        tested.setVersion(v);
+        Exception ex = null;
+        try {
+            String s3 = tested.createAditionalInfoTest();
+        } catch (Exception exx) {
+            ex = exx;
+        }
+        Assert.assertNotNull("Null reason vith set version must causes exception", ex);
+
+
+    }
+
+    private class BasicComponentSplashScreenImpl extends BasicComponentSplashScreen {
+
+        public BasicComponentSplashScreenImpl() {
+        }
+
+        @Override
+        public void paintComponent(Graphics g) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void paint(Graphics g) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void adjustForSize() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void startAnimation() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void stopAnimation() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        public String createAditionalInfoTest() {
+            return super.createAditionalInfo();
+        }
+
+        @Override
+        public void setPercentage(int done) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public int getPercentage() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItemTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItemTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,138 @@
+/* DescriptionInfoItemTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import junit.framework.Assert;
+import net.sourceforge.jnlp.ServerAccess;
+import org.junit.Test;
+
+public class DescriptionInfoItemTest {
+
+    private static final DescriptionInfoItem[] d = {new DescriptionInfoItem("Firm 1", null),
+        new DescriptionInfoItem("Firm 2", null),
+        new DescriptionInfoItem("Firm 3", "k1"),
+        new DescriptionInfoItem("Firm 4", "k2"),
+        new DescriptionInfoItem("Firm 6", "k1")};
+
+    @Test
+    public void setGetTest() {
+        DescriptionInfoItem di = new DescriptionInfoItem("a", "b");
+        Assert.assertEquals("a", di.getValue());
+        Assert.assertEquals("b", di.getKind());
+        Assert.assertEquals(InfoItem.description, di.getType());
+        di.setKind("q");
+        Assert.assertEquals("q", di.getKind());
+
+    }
+
+    @Test
+    public void isOfSameKindTests() {
+        boolean[] results = new boolean[]{true, true, false, false, false, true, true, false, false, false, false, false, true, false, true, false, false, false, true, false, false, false, true, false, true};
+        int x = -1;
+        for (int i = 0; i < d.length; i++) {
+            DescriptionInfoItem d1 = d[i];
+            for (int j = 0; j < d.length; j++) {
+                x++;
+                DescriptionInfoItem d2 = d[j];
+                ServerAccess.logOutputReprint(x + ": " + i + "x" + j + " " + d1.toString() + "x" + d2.toString() + "- same kind - " + d1.isOfSameKind(d2));
+                Assert.assertEquals(results[x], d1.isOfSameKind(d2));
+            }
+
+        }
+    }
+
+    @Test
+    public void isSameTest() {
+        boolean[] results = new boolean[]{true, true, false, false, false, true, true, false, false, false, false, false, true, false, true, false, false, false, true, false, false, false, true, false, true
+        };
+        int x = -1;
+        for (int i = 0; i < d.length; i++) {
+            DescriptionInfoItem d1 = d[i];
+            for (int j = 0; j < d.length; j++) {
+                x++;
+                DescriptionInfoItem d2 = d[j];
+                ServerAccess.logOutputReprint(x + ": " + i + "x" + j + " " + d1.toString() + "x" + d2.toString() + "- same  - " + d1.isSame(d2));
+                Assert.assertEquals(results[x], d1.isSame(d2));
+            }
+
+        }
+
+    }
+
+    @Test
+    public void equalsTest() {
+        boolean[] results = new boolean[]{true, false, false, false, false, false, true, false, false, false, false, false, true, false, false, false, false, false, true, false, false, false, false, false, true
+        };
+        int x = -1;
+        for (int i = 0; i < d.length; i++) {
+            DescriptionInfoItem d1 = d[i];
+            for (int j = 0; j < d.length; j++) {
+                x++;
+                DescriptionInfoItem d2 = d[j];
+                ServerAccess.logOutputReprint(x + ": " + i + "x" + j + ", " + d1.toString() + " x " + d2.toString() + "- equals  - " + d1.equals(d2));
+                Assert.assertEquals(results[x], d1.equals(d2));
+            }
+
+        }
+
+
+    }
+
+    @Test
+    public void toStringTest() {
+        DescriptionInfoItem d1 = new DescriptionInfoItem("Firm 3", null);
+        Assert.assertTrue(d1.toString().contains(d1.getValue()));
+        Assert.assertTrue(d1.toString().contains(d1.getType()));
+        Assert.assertTrue(d1.toString().contains("null"));
+        DescriptionInfoItem dd = new DescriptionInfoItem("Firm 3", "k1");
+        Assert.assertTrue(dd.toString().contains(dd.getValue()));
+        Assert.assertTrue(dd.toString().contains(dd.getType()));
+        Assert.assertTrue(dd.toString().contains(dd.getKind()));
+
+    }
+
+    @Test
+    public void toNiceStringTest() {
+        DescriptionInfoItem d1 = new DescriptionInfoItem("Firm 3", null);
+        Assert.assertTrue(d1.toNiceString().contains(d1.getValue()));
+        Assert.assertTrue(d1.toNiceString().contains(InfoItem.SPLASH + d1.getType()) || !d1.toNiceString().contains(InfoItem.SPLASH));
+        DescriptionInfoItem dd = new DescriptionInfoItem("Firm 3", "k1");
+        Assert.assertTrue(dd.toNiceString().contains(dd.getValue()));
+        Assert.assertTrue(dd.toNiceString().contains(InfoItem.SPLASH + dd.getType()) || !d1.toNiceString().contains(InfoItem.SPLASH));
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InfoItemTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InfoItemTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,120 @@
+/* InfoItemTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ *The optional kind="splash" attribute may be used in an icon element to indicate that the image is to be used as a "splash" screen during the launch of an application. If the JNLP file does not contain an icon element with kind="splash" attribute, Java Web Start will construct a splash screen using other items from the information Element.
+ *If the JNLP file does not contain any icon images, the splash image will consist of the application's title and vendor, as taken from the JNLP file.
+ *
+ * items not used inside
+ */
+public class InfoItemTest {
+
+    @Test
+    public void testGettersSetters() {
+        InfoItem ii = new InfoItem("a", "b");
+        Assert.assertEquals("a", ii.getType());
+        Assert.assertEquals("b", ii.getValue());
+        ii.setType("c");
+        Assert.assertEquals("c", ii.getType());
+        ii.setValue("d");
+        Assert.assertEquals("d", ii.getValue());
+
+    }
+
+    @Test
+    public void TestIsOfSameType() {
+        InfoItem i1 = new InfoItem("a", "b");
+        InfoItem i2 = new InfoItem("a", "c");
+        InfoItem i3 = new InfoItem("b", "a");
+        Assert.assertTrue(i1.isofSameType(i2));
+        Assert.assertFalse(i1.isofSameType(i3));
+        Assert.assertFalse(i2.isofSameType(i3));
+
+        DescriptionInfoItem d1 = new DescriptionInfoItem("a", InfoItem.descriptionKindToolTip);
+        InfoItem id1 = new InfoItem(InfoItem.description, "a");
+        Assert.assertTrue(id1.isofSameType(d1));
+
+    }
+
+    @Test
+    public void testEquals() {
+        InfoItem i1 = new InfoItem("a", "b");
+        InfoItem i11 = new InfoItem("a", "b");
+        InfoItem i2 = new InfoItem("a", "c");
+        InfoItem i3 = new InfoItem("b", "a");
+        Assert.assertFalse(i1.equals(i2));
+        Assert.assertFalse(i1.equals(i3));
+        Assert.assertFalse(i2.equals(i3));
+        Assert.assertTrue(i1.equals(i11));
+        DescriptionInfoItem d1 = new DescriptionInfoItem("a", InfoItem.descriptionKindToolTip);
+        InfoItem id1 = new InfoItem(InfoItem.description, "a");
+        Assert.assertTrue(id1.equals(d1));
+
+
+    }
+
+    @Test
+    public void toStringTest() {
+        InfoItem i1 = new InfoItem("aa", "bb");
+        Assert.assertTrue(i1.toString().contains("aa"));
+        Assert.assertTrue(i1.toString().contains("bb"));
+        Assert.assertTrue(i1.toString().length() > 4);
+
+    }
+
+    @Test
+    public void toNiceString() {
+        InfoItem i1 = new InfoItem("aaa", "bbb");
+        Assert.assertTrue(i1.toNiceString().contains(InfoItem.SPLASH + "aaa") || !i1.toNiceString().contains(InfoItem.SPLASH));
+        Assert.assertTrue(i1.toNiceString().contains("bbb"));
+        Assert.assertFalse(i1.toNiceString().equals(i1.toString()));
+    }
+
+    @Test
+    public void toXml() {
+        InfoItem i1 = new InfoItem("aa", "bb");
+        Assert.assertTrue(i1.toXml().contains("aa"));
+        Assert.assertTrue(i1.toXml().contains("bb"));
+        Assert.assertTrue(i1.toXml().length() > 4);
+        JEditorPaneBasedExceptionDialogTest.assertMarkup(i1.toXml());
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InformationElementTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InformationElementTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,241 @@
+/* InformationElementTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+/**
+http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html
+ */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.io.ByteArrayInputStream;
+import java.io.UnsupportedEncodingException;
+import net.sourceforge.jnlp.JNLPFile;
+import net.sourceforge.jnlp.ParseException;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ *
+ */
+public class InformationElementTest {
+
+    private final static InfoItem title = new InfoItem(InfoItem.title, "title exp");
+    private final static InfoItem vendor = new InfoItem(InfoItem.vendor, "vendor exp");
+    private final static InfoItem homepage = new InfoItem(InfoItem.homepage, "http://homepage.exp");
+    private final static DescriptionInfoItem oneLineD = new DescriptionInfoItem("One Line", DescriptionInfoItem.descriptionKindOneLine);
+    private final static DescriptionInfoItem toolTipD = new DescriptionInfoItem("Tooltip", DescriptionInfoItem.descriptionKindToolTip);
+    private final static DescriptionInfoItem short1D = new DescriptionInfoItem("short1", DescriptionInfoItem.descriptionKindShort);
+    private final static DescriptionInfoItem short2D = new DescriptionInfoItem("short2", DescriptionInfoItem.descriptionKindShort);
+    private final static DescriptionInfoItem noKindD = new DescriptionInfoItem("noKind", null);
+    private static final String testJnlpheader =
+            "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+            + "<jnlp spec=\"1.0\" href=\"http://somehref.jnlp\" codebase=\"http://some.code.base\">\n"
+            + "  <information>\n";
+    private static final String testJnlpFooter = "    <offline/>\n"
+            + "  </information>\n"
+            + "  <resources>\n"
+            + "    <j2se version=\"1.6+\"/>\n"
+            + "    <jar href=\"somejar\"/>\n"
+            + "  </resources>\n"
+            + "  <application-desc main-class=\"someMainClass\">\n"
+            + "  </application-desc>\n"
+            + "</jnlp>";
+
+    @Test
+    public void testSetGetTitle() {
+
+        InformationElement ie = new InformationElement();
+        Assert.assertNull("After creation value must be null", ie.getTitle());
+        ie.setTitle(title.getValue());
+        Assert.assertNotNull("After assigmentvalue must NOT be null", ie.getTitle());
+        Assert.assertTrue("After assigment value must be included in output", ie.getTitle().contains(title.getValue()));
+    }
+
+    @Test
+    public void testSetGetvendor() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNull("After creation value must be null", ie.getVendor());
+        ie.setvendor(vendor.getValue());
+        Assert.assertNotNull("After assigmentvalue must NOT be null", ie.getVendor());
+        Assert.assertTrue("After assigment value must be included in output", ie.getVendor().contains(vendor.getValue()));
+    }
+
+    @Test
+    public void testSetGetHomepage() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNull("After creation value must be null", ie.getHomepage());
+        ie.setHomepage(homepage.getValue());
+        Assert.assertNotNull("After assigmentvalue must NOT be null", ie.getHomepage());
+        Assert.assertTrue("After assigment value must be included in output", ie.getHomepage().contains(homepage.getValue()));
+    }
+
+    @Test
+    public void addDescriptionTest() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should be empty", 0, ie.getDescriptions().size());
+        ie.addDescription(toolTipD.getValue(), toolTipD.getKind());
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should be empty", 1, ie.getDescriptions().size());
+        ie.addDescription(short1D.getValue(), short1D.getKind());
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should be empty", 2, ie.getDescriptions().size());
+        ie.addDescription(short2D.getValue(), short2D.getKind());
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should reamin same", 2, ie.getDescriptions().size());
+        ie.addDescription(oneLineD.getValue(), oneLineD.getKind());
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should be ", 3, ie.getDescriptions().size());
+        ie.addDescription(noKindD.getValue(), noKindD.getKind());
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should be ", 4, ie.getDescriptions().size());
+
+
+    }
+
+    public void getBestMatchingDescriptionForSplashTest() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNull(ie.getBestMatchingDescriptionForSplash());
+        ie.addDescription(toolTipD.getValue(), toolTipD.getKind());
+        Assert.assertNull(ie.getBestMatchingDescriptionForSplash());
+        ie.addDescription(short1D.getValue(), short1D.getKind());
+        Assert.assertNull(ie.getBestMatchingDescriptionForSplash());
+        ie.addDescription(noKindD.getValue(), noKindD.getKind());
+        Assert.assertNotNull(ie.getBestMatchingDescriptionForSplash());
+        Assert.assertEquals(ie.getBestMatchingDescriptionForSplash().getValue(), (noKindD.getValue()));
+        ie.addDescription(oneLineD.getValue(), oneLineD.getKind());
+        Assert.assertNotNull(ie.getBestMatchingDescriptionForSplash());
+        Assert.assertEquals(ie.getBestMatchingDescriptionForSplash().getValue(), (oneLineD.getValue()));
+        ie.addDescription(short2D.getValue(), short2D.getKind());
+        Assert.assertNotNull(ie.getBestMatchingDescriptionForSplash());
+        Assert.assertEquals(ie.getBestMatchingDescriptionForSplash().getValue(), (oneLineD.getValue()));
+
+
+    }
+
+    public void getLongestDescriptionForSplashTest() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNull(ie.getLongestDescriptionForSplash());
+        ie.addDescription(toolTipD.getValue(), toolTipD.getKind());
+        Assert.assertNotNull(ie.getLongestDescriptionForSplash());
+        Assert.assertEquals(ie.getLongestDescriptionForSplash().getValue(), (toolTipD.getValue()));
+        ie.addDescription(oneLineD.getValue(), oneLineD.getKind());
+        Assert.assertNotNull(ie.getLongestDescriptionForSplash());
+        Assert.assertEquals(ie.getLongestDescriptionForSplash().getValue(), (oneLineD.getValue()));
+        ie.addDescription(noKindD.getValue(), noKindD.getKind());
+        ie.addDescription(oneLineD.getValue(), oneLineD.getKind());//disturb
+        Assert.assertNotNull(ie.getLongestDescriptionForSplash());
+        Assert.assertEquals(ie.getLongestDescriptionForSplash().getValue(), (noKindD.getValue()));
+        ie.addDescription(short1D.getValue(), short1D.getKind());
+        ie.addDescription(toolTipD.getValue(), toolTipD.getKind());//disturb
+        Assert.assertNotNull(ie.getLongestDescriptionForSplash());
+        Assert.assertEquals(ie.getLongestDescriptionForSplash().getValue(), (short1D.getValue()));
+
+    }
+
+    @Test
+    public void getDescriptionTest() {
+        getBestMatchingDescriptionForSplashTest();
+
+    }
+
+    @Test
+    public void getHeaderTest() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNotNull("Header should never be null", ie.getHeader());
+        Assert.assertEquals(0, ie.getHeader().size());
+        ie.setvendor(vendor.getValue());
+        Assert.assertEquals(1, ie.getHeader().size());
+        ie.setTitle(title.getValue());
+        Assert.assertEquals(2, ie.getHeader().size());
+        ie.setHomepage(homepage.getValue());
+        Assert.assertEquals(3, ie.getHeader().size());
+        ie.setTitle(homepage.getValue());
+        Assert.assertEquals(3, ie.getHeader().size());
+        ie.addDescription(toolTipD.getValue());
+        Assert.assertEquals(3, ie.getHeader().size());
+        ie.addDescription(oneLineD.getValue());
+        Assert.assertEquals(3, ie.getHeader().size());
+    }
+
+    @Test
+    public void createFromJNLP() throws UnsupportedEncodingException, ParseException {
+        JNLPFile jnlpFile0 = null;
+        InformationElement ie0 = InformationElement.createFromJNLP(jnlpFile0);
+        Assert.assertNull(ie0);
+        String exJnlp1 = "<jnlp>this is invalid jnlp<jnlp>";
+        Exception ex = null;
+        JNLPFile jnlpFile1 = null;
+        try {
+            jnlpFile1 = new JNLPFile(new ByteArrayInputStream(exJnlp1.getBytes("utf-8")), true);
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        InformationElement ie1 = InformationElement.createFromJNLP(jnlpFile1);
+        Assert.assertNull(ie1);
+
+        //title, vendor and homepage are obligatory.. not so much to test
+        String exJnlp2 = testJnlpheader + title.toXml() + "\n" + homepage.toXml() + "\n" + vendor.toXml() + "\n" + testJnlpFooter;
+        JNLPFile jnlpFile2 = new JNLPFile(new ByteArrayInputStream(exJnlp2.getBytes("utf-8")), true);
+        InformationElement ie2 = InformationElement.createFromJNLP(jnlpFile2);
+        Assert.assertNotNull(ie2);
+        Assert.assertEquals(3, ie2.getHeader().size());
+        Assert.assertEquals(0, ie2.getDescriptions().size());
+
+        String exJnlp3 = testJnlpheader + title.toXml() + "\n" + homepage.toXml() + "\n" + vendor.toXml() + "\n" + toolTipD.toXml() + "\n" + testJnlpFooter;
+        JNLPFile jnlpFile3 = new JNLPFile(new ByteArrayInputStream(exJnlp3.getBytes("utf-8")), true);
+        InformationElement ie3 = InformationElement.createFromJNLP(jnlpFile3);
+        Assert.assertNotNull(ie3);
+        Assert.assertEquals(3, ie3.getHeader().size());
+        Assert.assertEquals(1, ie3.getDescriptions().size());
+
+        String exJnlp4 = testJnlpheader + title.toXml() + "\n" + homepage.toXml() + "\n" + vendor.toXml() + "\n" + noKindD.toXml() + "\n" + testJnlpFooter;
+        JNLPFile jnlpFile4 = new JNLPFile(new ByteArrayInputStream(exJnlp4.getBytes("utf-8")), true);
+        InformationElement ie4 = InformationElement.createFromJNLP(jnlpFile4);
+        Assert.assertNotNull(ie4);
+        Assert.assertEquals(3, ie4.getHeader().size());
+        Assert.assertEquals(1, ie4.getDescriptions().size());
+
+        String exJnlp5 = testJnlpheader + title.toXml() + "\n" + homepage.toXml() + "\n" + vendor.toXml() + "\n" + noKindD.toXml() + "\n" + toolTipD.toXml() + "\n" + testJnlpFooter;
+        JNLPFile jnlpFile5 = new JNLPFile(new ByteArrayInputStream(exJnlp5.getBytes("utf-8")), true);
+        InformationElement ie5 = InformationElement.createFromJNLP(jnlpFile5);
+        Assert.assertNotNull(ie5);
+        Assert.assertEquals(3, ie5.getHeader().size());
+        Assert.assertEquals(2, ie5.getDescriptions().size());
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialogTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialogTest.java	Wed Aug 01 13:40:20 2012 +0200
@@ -0,0 +1,190 @@
+/* JeditorPaneBasedExceptionDialog.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import net.sourceforge.jnlp.runtime.Translator;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class JEditorPaneBasedExceptionDialogTest {
+
+    private static RuntimeException eex = new RuntimeException("ex2");
+    private static Exception ex = new Exception("ex1", eex);
+    private static String ai = "Another info";
+    private static InformationElement ec = new InformationElement();
+    private static List<String> l = new ArrayList<String>(3);
+
+    @BeforeClass
+    public static void fillLists() {
+        ec.setHomepage("item 1");
+        ec.setTitle("item 2");
+        ec.setvendor("item 3");
+        ec.addDescription("item 4");
+        l = JEditorPaneBasedExceptionDialog.infoElementToList(ec);
+
+    }
+
+    static void assertHtml(String s) {
+        Assert.assertTrue("result of getText must be marked html", s.contains("html"));
+        Assert.assertTrue("result of getText must be marked html", s.contains("body"));
+        assertMarkup(s);
+    }
+
+    static void assertMarkup(String s) {
+        Assert.assertTrue("result of getText must be marked in by  html markup", s.contains("<") && s.contains(">"));
+        Assert.assertTrue("result of getText must be marked in by  html markup", s.contains("</") || s.contains("/>"));
+    }
+
+    private void assertAI(String s, boolean b) {
+        if (b) {
+            Assert.assertTrue("result of getText must contains annother info", s.contains(ai));
+        } else {
+            Assert.assertFalse("result of getText must NOT contains annother info", s.contains(ai));
+        }
+    }
+
+    private void assertLL(String s, boolean b) {
+        for (String i : l) {
+
+            if (b) {
+                Assert.assertTrue("result of getText must contains  info list", s.contains(i));
+            } else {
+                Assert.assertFalse("result of getText must NOT contains info list", s.contains(i));
+            }
+        }
+    }
+
+    private void assertFullException(String s, boolean b) {
+        if (b) {
+            Assert.assertTrue("result of getText must contains  complete exception", s.contains(ex.getMessage()));
+            Assert.assertTrue("result of getText must contains  complete exception", s.contains(eex.getMessage()));
+        } else {
+            Assert.assertFalse("result of getText must contains not  complete exception", s.contains(ex.getMessage()));
+            Assert.assertFalse("result of getText must contains  not complete exception", s.contains(eex.getMessage()));
+
+        }
+    }
+
+    @Test
+    public void getTextTest() {
+        String s1 = JEditorPaneBasedExceptionDialog.getText(ex, l, ai);
+        String s2 = JEditorPaneBasedExceptionDialog.getText(ex, l, null);
+        String s3 = JEditorPaneBasedExceptionDialog.getText(ex, null, ai);
+        String s4 = JEditorPaneBasedExceptionDialog.getText(null, l, ai);
+        assertHtml(s1);
+        assertHtml(s2);
+        assertHtml(s3);
+        assertHtml(s4);
+        assertAI(s1, true);
+        assertAI(s2, false);
+        assertAI(s3, true);
+        assertAI(s4, true);
+        assertLL(s1, true);
+        assertLL(s2, true);
+        assertLL(s3, false);
+        assertLL(s4, true);
+        assertFullException(s1, true);
+        assertFullException(s2, true);
+        assertFullException(s3, true);
+        assertFullException(s4, false);
+        JEditorPaneBasedExceptionDialog d1 = new JEditorPaneBasedExceptionDialog(null, false, ex, ec, ai);
+        JEditorPaneBasedExceptionDialog d2 = new JEditorPaneBasedExceptionDialog(null, false, ex, ec, null);
+        JEditorPaneBasedExceptionDialog d3 = new JEditorPaneBasedExceptionDialog(null, false, ex, null, ai);
+        JEditorPaneBasedExceptionDialog d4 = new JEditorPaneBasedExceptionDialog(null, false, null, ec, ai);
+        Assert.assertTrue("message from dialog mus be same as pattern", d1.getMessage().equals(s1));
+        Assert.assertTrue("message from dialog mus be same as pattern", d2.getMessage().equals(s2));
+        Assert.assertTrue("message from dialog mus be same as pattern", d3.getMessage().equals(s3));
+        Assert.assertTrue("message from dialog mus be same as pattern", d4.getMessage().equals(s4));
+
+    }
+
+    @Test
+    public void getExceptionStackTraceAsString() {
+        String t1 = JEditorPaneBasedExceptionDialog.getExceptionStackTraceAsString(ex);
+        assertFullException(t1, true);
+        String t2 = JEditorPaneBasedExceptionDialog.getExceptionStackTraceAsString(null);
+        Assert.assertNotNull("For null empty result must not be null", t2);
+        Assert.assertEquals("null input must result to empty string", "", t2);
+    }
+
+    @Test
+    public void getExceptionStackTraceAsStrings() {
+        String[] t1 = JEditorPaneBasedExceptionDialog.getExceptionStackTraceAsStrings(ex);
+        assertFullException(Arrays.toString(t1), true);
+        String[] t2 = JEditorPaneBasedExceptionDialog.getExceptionStackTraceAsStrings(null);
+        Assert.assertNotNull("For null empty result must not be null", t2);
+        Assert.assertArrayEquals("null input must result to empty array", new String[0], t2);
+    }
+
+    @Test
+    public void formatListInfoList() {
+        String t1 = JEditorPaneBasedExceptionDialog.formatListInfoList(l);
+        assertMarkup(t1);
+        assertLL(t1, true);
+        String t2 = JEditorPaneBasedExceptionDialog.formatInfo(null);
+        Assert.assertNotNull("For null empty result must not be null", t2);
+        Assert.assertEquals("null input must result to empty string", "", t2);
+    }
+
+    @Test
+    public void formatInfo() {
+        String s = "SOME STRING";
+        String t1 = JEditorPaneBasedExceptionDialog.formatInfo(s);
+        assertMarkup(t1);
+        Assert.assertTrue("Marked text must contains source", t1.contains(s));
+        String t2 = JEditorPaneBasedExceptionDialog.formatInfo(null);
+        Assert.assertNotNull("For null empty result must not be null", t2);
+        Assert.assertEquals("null input must result to empty string", "", t2);
+
+    }
+
+    @Test
+    public void infoElementToListTets() {
+
+        List<String> tl = JEditorPaneBasedExceptionDialog.infoElementToList(ec);
+        Assert.assertTrue("Transformed elemetn must contains all items ", tl.contains(l.get(0)));
+        Assert.assertTrue("Transformed elemetn must contains all items ", tl.contains(l.get(1)));
+        Assert.assertTrue("Transformed elemetn must contains all items ", tl.contains(l.get(2)));
+        Assert.assertTrue("Transformed elemetn must contains all items ", tl.contains(l.get(3)));
+    }
+}
diff -r 01544fb82384 tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
--- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java	Wed Aug 01 13:40:20 2012 +0200
@@ -54,9 +54,7 @@
 import java.net.ServerSocket;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 import net.sourceforge.jnlp.browsertesting.Browser;
 import net.sourceforge.jnlp.browsertesting.BrowserFactory;
 import net.sourceforge.jnlp.browsertesting.Browsers;
-------------- next part --------------
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/SplashController.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashController.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,48 @@
+/* SplashController.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+public interface SplashController {
+
+    public void removeSplash();
+
+    public void replaceSplash(SplashPanel r);
+
+    public int getSplashWidth();
+
+    public int getSplashHeigth();
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/SplashErrorPanel.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashErrorPanel.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,47 @@
+/* SplashErrorPanel.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+public interface SplashErrorPanel extends SplashPanel {
+
+    /**
+     * When applet loading fails, then dying stacktrace can be set, and is then shown to user on demand.
+     */
+    public Throwable getLoadingException();
+
+    public void setLoadingException(Throwable loadingException);
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/SplashPanel.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashPanel.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,124 @@
+/* SplashPanel.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import java.awt.Graphics;
+import java.awt.event.ComponentListener;
+
+import javax.swing.JComponent;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
+
+public interface SplashPanel {
+
+    /**
+     * The plugin splashscreens must be placed into another containers,
+     * So must return themselves as JComponent.
+     * Mostly your SplashScreen will extend some JComponent, so this method will
+     * just return "this"
+     */
+    public JComponent getSplashComponent();
+
+    /**
+     * javaws should provide content of <information> tag. Those informations hould be passed by this method
+     */
+    public void setInformationElement(InformationElement content);
+
+    public InformationElement getInformationContent();
+
+    /** Width of the plugin window */
+    public void setPluginWidth(int pluginWidth);
+
+    /** Height of the plugin window */
+    public void setPluginHeight(int pluginHeight);
+
+    /** Width of the plugin window */
+    public int getPluginWidth();
+
+    /** Height of the plugin window */
+    public int getPluginHeight();
+
+    public void adjustForSize();
+
+    // Add a new listener for resizes
+    public void addComponentListener(ComponentListener cl);
+
+    public boolean isAnimationRunning();
+
+    /**
+     * Methods to start the animation in the splash panel.
+     *
+     * This method exits after starting a new thread to do the animation. It
+     * is synchronized to prevent multiple startAnimation threads from being created.
+     */
+    public void startAnimation();
+
+    /**
+     * Stops the animation
+     */
+    public void stopAnimation();
+
+    public void paint(Graphics g);
+
+    /**
+     * Decide wather to show icedtea-web plugin or just icedtea-web
+     * @param splashReason
+     */
+    public void setSplashReason(SplashReason splashReason);
+
+    SplashReason getSplashReason();
+
+    /**
+     * Version can be printed in splash window
+     * @param version
+     */
+    public void setVersion(String version);
+
+    String getVersion();
+
+    /**
+     * how mny percentage loaded  is shown in progress bar (if any)
+     * @param done
+     */
+    public void setPercentage(int done);
+
+    /**
+     * returns state of loading progress bar
+     * @return
+     */
+    public int getPercentage();
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/SplashUtils.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashUtils.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,219 @@
+/* SplashUtils.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import net.sourceforge.jnlp.JNLPSplashScreen;
+import net.sourceforge.jnlp.runtime.AppletEnvironment;
+import net.sourceforge.jnlp.runtime.AppletInstance;
+import net.sourceforge.jnlp.runtime.Boot;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
+import net.sourceforge.jnlp.splashscreen.impls.*;
+
+public class SplashUtils {
+
+    static final String ICEDTEA_WEB_PLUGIN_SPLASH = "ICEDTEA_WEB_PLUGIN_SPLASH";
+    static final String ICEDTEA_WEB_SPLASH = "ICEDTEA_WEB_SPLASH";
+    static final String NONE = "none";
+    static final String DEFAULT = "default";
+
+    public static enum SplashReason {
+
+        APPLET, JAVAWS;
+
+        @Override
+        public String toString() {
+            switch (this) {
+                case APPLET:
+                    return "IcedTea-Web Plugin";
+                case JAVAWS:
+                    return "IcedTea-Web";
+            }
+            return "unknown";
+        }
+    }
+
+    public static void showErrorCaught(Throwable ex, AppletInstance appletInstance) {
+        try {
+            showError(ex, appletInstance);
+        } catch (Throwable t) {
+            if (JNLPRuntime.isDebug()) {
+                // prinitng this exception is discutable. I have let it in for case that
+                //some retyping will fail
+                t.printStackTrace();
+            }
+        }
+    }
+
+    public static void showError(Throwable ex, AppletInstance appletInstance) {
+        if (appletInstance == null) {
+            return;
+        }
+        AppletEnvironment ae = appletInstance.getAppletEnvironment();
+        showError(ex, ae);
+    }
+
+    public static void showError(Throwable ex, AppletEnvironment ae) {
+        if (ae == null) {
+            return;
+        }
+        SplashController p = ((SplashController) (ae.getAppletFrame()));
+        showError(ex, p);
+    }
+
+    public static void showError(Throwable ex, SplashController f) {
+        if (f == null) {
+            return;
+        }
+
+        f.replaceSplash(getErrorSplashScreen(f.getSplashWidth(), f.getSplashHeigth(), ex));
+    }
+
+    
+    private static SplashReason getReason() {
+        if (JNLPRuntime.isWebstartApplication()){
+            return SplashReason.JAVAWS;
+        }else{
+            return SplashReason.APPLET;
+        }
+        
+    }
+    
+
+    /**
+     * Warrning - splash should have recieve width and height without borders.
+     * plugin's window have NO border, but javaws window HAVE border. This msut be calcualted prior calling this method
+     * @param width
+     * @param height
+     * @return
+     */
+    public static SplashPanel getSplashScreen(int width, int height) {
+        return getSplashScreen(width, height, getReason());
+    }
+
+    /**
+     * Warrning - splash should have recieve width and height without borders.
+     * plugin's window have NO border, but javaws window HAVE border. This msut be calcualted prior calling this method
+     * @param width
+     * @param height
+     * @param  ex - exception to be shown if any
+     * @return
+     */
+    public static SplashErrorPanel getErrorSplashScreen(int width, int height, Throwable ex) {
+        return getErrorSplashScreen(width, height, getReason(), ex);
+    }
+
+    /**
+     * Warrning - splash should have recieve width and height without borders.
+     * plugin's window have NO border, but javaws window HAVE border. This msut be calcualted prior calling this method
+     * @param width
+     * @param height
+     * @param splashReason
+     * @return
+     */
+    static SplashPanel getSplashScreen(int width, int height, SplashUtils.SplashReason splashReason) {
+        return getSplashScreen(width, height, splashReason, null, false);
+    }
+
+    /**
+     * Warrning - splash should have recieve width and height without borders.
+     * plugin's window have NO border, but javaws window HAVE border. This msut be calcualted prior calling this method
+     * @param width
+     * @param height
+     * @param splashReason
+     * @return
+     */
+    static SplashErrorPanel getErrorSplashScreen(int width, int height, SplashUtils.SplashReason splashReason, Throwable ex) {
+        return (SplashErrorPanel) getSplashScreen(width, height, splashReason, ex, true);
+    }
+
+    static SplashPanel getSplashScreen(int width, int height, SplashUtils.SplashReason splashReason, Throwable loadingException, boolean isError) {
+        String splashEnvironmetVar = null;
+        String pluginSplashEnvironmetVar = null;
+        try {
+            pluginSplashEnvironmetVar = System.getenv(ICEDTEA_WEB_PLUGIN_SPLASH);
+            splashEnvironmetVar = System.getenv(ICEDTEA_WEB_SPLASH);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        SplashPanel sp = null;
+        if (SplashReason.JAVAWS.equals(splashReason)) {
+            if (NONE.equals(splashEnvironmetVar)) {
+                return null;
+            }
+//            if ("circle".equals(splashEnvironmetVar)) {
+//                sp = new CircleSplashScreen(width, height, splashReason);
+//            }
+//            if ("dummy".equals(splashEnvironmetVar)) {
+//                sp = new DummySplashScreen(width, height, splashReason);
+//            }
+            if (DEFAULT.equals(splashEnvironmetVar)) {
+                if (isError) {
+                    sp = new DefaultErrorSplashScreen2012(width, height, splashReason, loadingException);
+                } else {
+                    sp = new DefaultSplashScreen2012(width, height, splashReason);
+                }
+            }
+        }
+        if (SplashReason.APPLET.equals(splashReason)) {
+            if (NONE.equals(pluginSplashEnvironmetVar)) {
+                return null;
+            }
+//            if ("circle".equals(pluginSplashEnvironmetVar)) {
+//                sp = new CircleSplashScreen(width, height, splashReason);
+//            }
+//            if ("dummy".equals(pluginSplashEnvironmetVar)) {
+//                sp = new DummySplashScreen(width, height, splashReason);
+//            }
+            if (DEFAULT.equals(pluginSplashEnvironmetVar)) {
+                if (isError) {
+                    sp = new DefaultErrorSplashScreen2012(width, height, splashReason, loadingException);
+                } else {
+                    sp = new DefaultSplashScreen2012(width, height, splashReason);
+                }
+            }
+        }
+        //if (sp==null)  sp=new DummySplashScreen(width, height,splashReason);
+        //if (sp==null)  sp=new CircleSplashScreen(width, height,splashReason);
+        if (isError) {
+            sp = new DefaultErrorSplashScreen2012(width, height, splashReason, loadingException);
+        } else {
+            sp = new DefaultSplashScreen2012(width, height, splashReason);
+        }
+        sp.setVersion(Boot.version);
+        return sp;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSplashScreen2012.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSplashScreen2012.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,118 @@
+/* DefaultErrorSplashScreen12.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls;
+
+import java.awt.Graphics;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.ErrorPainter;
+import net.sourceforge.jnlp.splashscreen.parts.BasicComponentErrorSplashScreen;
+
+public final class DefaultErrorSplashScreen2012 extends BasicComponentErrorSplashScreen {
+
+    private final DefaultErrorSplashScreen2012 self;
+    private final ErrorPainter painter;
+    private final DefaultSplashScreens2012Commons commons;
+
+    public DefaultErrorSplashScreen2012(int width, int height, SplashReason splashReason, Throwable ex) {
+        //setting width and height now is causing  unnecessary blinking
+        //setPluginHeight(height);
+        //setPluginWidth(width);
+        //to have this in inner classes
+        self = this;
+        setLoadingException(ex);
+        setSplashReason(splashReason);
+        painter = new ErrorPainter(self, true);
+        addMouseListener(new MouseAdapter() {
+
+            @Override
+            public void mouseClicked(MouseEvent e) {
+                if (((ErrorPainter) painter).getErrorCorner() != null
+                        && e.getX() > ((ErrorPainter) painter).getErrorCorner().x
+                        && e.getY() > ((ErrorPainter) painter).getErrorCorner().y) {
+                    raiseExceptionDialog();
+                }
+            }
+        });
+        commons = new DefaultSplashScreens2012Commons(painter, self);
+    }
+
+    @Override
+    public void paintComponent(Graphics g) {
+        paint(g);
+    }
+
+    @Override
+    public void paint(Graphics g) {
+        commons.paint(g);
+
+
+    }
+
+    @Override
+    public void adjustForSize() {
+        commons.adjustForSize();
+    }
+
+    @Override
+    public void stopAnimation() {
+        commons.stopAnimation();
+    }
+
+    /**
+     * Methods to start the animation in the splash panel.
+     *
+     * This method exits after starting a new thread to do the animation. It
+     * is synchronized to prevent multiple startAnimation threads from being created.
+     */
+    @Override
+    public void startAnimation() {
+        commons.startAnimation();
+    }
+
+    @Override
+    public void setPercentage(int done) {
+       commons.setPercentage(done);
+    }
+
+    @Override
+    public int getPercentage() {
+        return commons.getPercentage();
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreen2012.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreen2012.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,105 @@
+/* DefaultSplashScreen12.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls;
+
+import java.awt.Graphics;
+
+
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.BasePainter;
+import net.sourceforge.jnlp.splashscreen.parts.BasicComponentSplashScreen;
+
+public final class DefaultSplashScreen2012 extends BasicComponentSplashScreen {
+
+    private final DefaultSplashScreen2012 self;
+    private final BasePainter painter;
+    private final DefaultSplashScreens2012Commons commons;
+
+    public DefaultSplashScreen2012(int width, int height, SplashReason splashReason) {
+        //setting width and height now is causing  unnecessary blinking
+        //setPluginHeight(height);
+        //setPluginWidth(width);
+        //to have this in inner classes
+        self = this;
+        setSplashReason(splashReason);
+        painter = new BasePainter(this);
+        commons = new DefaultSplashScreens2012Commons(painter, self);
+    }
+
+    @Override
+    public void paintComponent(Graphics g) {
+        paint(g);
+    }
+
+    @Override
+    public void paint(Graphics g) {
+        commons.paint(g);
+
+
+    }
+
+    @Override
+    public void adjustForSize() {
+        commons.adjustForSize();
+    }
+
+    @Override
+    public void stopAnimation() {
+        commons.stopAnimation();
+    }
+
+    /**
+     * Methods to start the animation in the splash panel.
+     *
+     * This method exits after starting a new thread to do the animation. It
+     * is synchronized to prevent multiple startAnimation threads from being created.
+     */
+    @Override
+    public void startAnimation() {
+        commons.startAnimation();
+    }
+
+    @Override
+    public void setPercentage(int done) {
+        commons.setPercentage(done);
+    }
+
+    @Override
+    public int getPercentage() {
+        return commons.getPercentage();
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,115 @@
+/* DefaultSplashScreensCommons2012.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls;
+
+import java.awt.Graphics;
+import java.awt.event.ComponentAdapter;
+import java.awt.event.ComponentEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.BasePainter;
+import net.sourceforge.jnlp.splashscreen.parts.BasicComponentSplashScreen;
+
+public final class DefaultSplashScreens2012Commons {
+
+    private final BasicComponentSplashScreen parent;
+    private final BasePainter painter;
+
+    public DefaultSplashScreens2012Commons(BasePainter painterr, BasicComponentSplashScreen parentt) {
+        this.painter = painterr;
+        this.parent = parentt;
+        parent.addMouseListener(new MouseAdapter() {
+
+            @Override
+            public void mouseClicked(MouseEvent e) {
+                painter.increaseAnimationPosition();
+                parent.repaint();
+            }
+        });
+        // Add a new listener for resizes
+        parent.addComponentListener(new ComponentAdapter() {
+            // Re-adjust variables based on size
+
+            @Override
+            public void componentResized(ComponentEvent e) {
+                parent.setPluginWidth(parent.getWidth());
+                parent.setPluginHeight(parent.getHeight());
+                parent.adjustForSize();
+                parent.repaint();
+            }
+        });
+    }
+
+    public void paint(Graphics g) {
+        painter.paint(g);
+
+
+    }
+
+    public void adjustForSize() {
+        painter.adjustForSize(parent.getPluginWidth(), parent.getPluginHeight());
+    }
+
+    public void stopAnimation() {
+        parent.setAnimationRunning(false);
+    }
+
+    /**
+     * Methods to start the animation in the splash panel.
+     *
+     * This method exits after starting a new thread to do the animation. It
+     * is synchronized to prevent multiple startAnimation threads from being created.
+     */
+    public void startAnimation() {
+        if (parent.isAnimationRunning()) {
+            return;
+        }
+        parent.setAnimationRunning(true);
+        painter.startAnimationThreads();
+
+    }
+
+    public void setPercentage(int done) {
+        painter.clearCachedWaterTextImage();
+        painter.setWaterLevel(done);
+    }
+
+    public int getPercentage() {
+        return painter.getWaterLevel();
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainter.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainter.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,508 @@
+/* BasePainter.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.*;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.Toolkit;
+import java.awt.font.TextAttribute;
+import java.awt.image.BufferedImage;
+import java.util.HashMap;
+import java.util.List;
+
+import java.util.Map;
+
+import javax.swing.SwingUtilities;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.parts.BasicComponentSplashScreen;
+import net.sourceforge.jnlp.splashscreen.parts.InfoItem;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
+
+public class BasePainter {
+
+    protected final BasicComponentSplashScreen master;
+    //animations
+    //waterLevel of water (0-100%)
+    private int waterLevel = 0;
+    //waving of water and position of shhadowed WEB
+    private int animationsPosition = 0;
+    private int greyTextIncrment = 15; //how quickly is greyed web moving
+    //colors
+    protected static final Color teaLiveColor = new Color(205, 1, 3);
+    protected static final Color backgroundLiveColor = Color.white;
+    protected static final Color teaLeafsStalksLiveColor = Color.black;
+    protected static final Color pluginLiveColor = Color.black;
+    protected static final Color waterLiveColor = new Color(80, 131, 160);
+    protected static final Color plainTextLiveColor = Color.black;
+    protected Color teaColor;
+    protected Color backgroundColor;
+    protected Color teaLeafsStalksColor;
+    protected Color pluginColor;
+    protected Color waterColor;
+    protected Color plainTextColor;
+    //BufferedImage tmpBackround; //testingBackground for fitting
+    protected BufferedImage prerenderedStuff;
+    private Font teaFont;
+    private Font icedFont;
+    private Font webFont;
+    private Font pluginFont;
+    private Font plainTextsFont;
+    private Font alternativeTextFont;
+    //those spaces are meaningful for centering the text.. thats why alternative;)
+    private static final String alternativeICED = "Iced    ";
+    private static final String alternativeWeb = "Web  ";
+    private static final String alternativeTtea = "    Tea";
+    private static final String alternativePlugin = "plugin ";
+    private static final String ICED = "Iced";
+    private static final String web = "web";
+    private static final String tea = "Tea";
+    private static final String plugin = "plugin  ";
+    //inidivdual sizes, all converging to ZERO!!
+    private final int WEB_TOP_ALIGMENT = 324;
+    private final int WEB_LEFT_ALIGMENT = 84;
+    //enabling
+    protected boolean showNiceTexts = true;
+    private boolean showLeaf = true;
+    private boolean showInfo = true;
+    protected TextWithWaterLevel twl;
+    protected TextWithWaterLevel oldTwl;
+    protected boolean canWave = true;
+
+    protected void paintNiceTexts(Graphics2D g2d) {
+        //the only animated stuff
+        oldTwl = twl;
+        twl = new TextWithWaterLevel(ICED, icedFont);
+        if (oldTwl != null && !canWave) {
+            twl.setCachedPolygon(oldTwl.getCachedPolygon());
+        }
+        twl.setPercentageOfWater(waterLevel);
+        twl.setBgColor(backgroundColor);
+        twl.setWaterColor(waterColor);
+        twl.cutTo(g2d, scaleX(42), scaleY(278));
+        MovingText mt = new MovingText(web, webFont);
+        mt.setPercentageOfWater(animationsPosition);
+        mt.cutTo(g2d, scaleX(WEB_LEFT_ALIGMENT), scaleY(WEB_TOP_ALIGMENT));
+    }
+
+    protected void paintPlainTexts(Graphics2D g2d) {
+        g2d.setFont(alternativeTextFont);
+        g2d.setColor(waterColor);
+        drawTextAroundCenter(g2d, -0.6d, alternativeICED);
+        g2d.setColor(teaColor);
+        drawTextAroundCenter(g2d, -0.6d, alternativeTtea);
+        g2d.setColor(pluginColor);
+        String s = getAlternativeProduktName();
+        int sub = animationsPosition / greyTextIncrment;
+        sub = sub % s.length();
+        if (!master.isAnimationRunning()) {
+            sub = s.length();
+        }
+        drawTextAroundCenter(g2d, 0.3d, s.substring(0, sub));
+    }
+    //enabling end
+
+    private int scaleAvarage(double origValue) {
+        return (int) (avarageRatio() * origValue);
+    }
+
+    private int scaleMax(double origValue) {
+        return (int) (maxRatio() * origValue);
+    }
+
+    private int scaleMin(double origValue) {
+        return (int) (minRatio() * origValue);
+    }
+
+    private double avarageRatio() {
+        return (getRatioX() + getRatioY()) / 2d;
+    }
+
+    private double minRatio() {
+        return Math.min(getRatioX(), getRatioY());
+    }
+
+    private double maxRatio() {
+        return Math.max(getRatioX(), getRatioY());
+    }
+
+    private int scaleY(double origValue) {
+        return (int) scaleY(master.getPluginHeight(), origValue);
+    }
+
+    private int scaleX(double origValue) {
+        return (int) scaleX(master.getPluginWidth(), origValue);
+    }
+
+    private double getRatioY() {
+        return getRatio(DefaultSplashScreen2012.ORIGINAL_H, master.getPluginHeight());
+    }
+
+    private double getRatioX() {
+        return getRatio(DefaultSplashScreen2012.ORIGINAL_W, master.getPluginWidth());
+    }
+
+    private static double scaleY(double currentSize, double origValue) {
+        return scale(DefaultSplashScreen2012.ORIGINAL_H, currentSize, origValue);
+    }
+
+    private static double scaleX(double currentSize, double origValue) {
+        return scale(DefaultSplashScreen2012.ORIGINAL_W, currentSize, origValue);
+    }
+
+    private static double getRatioY(double currentSize) {
+        return getRatio(DefaultSplashScreen2012.ORIGINAL_H, currentSize);
+    }
+
+    private static double getRatioX(double currentSize) {
+        return getRatio(DefaultSplashScreen2012.ORIGINAL_W, currentSize);
+    }
+
+    public static double scale(double origSize, double currentSize, double origValue) {
+        return getRatio(origSize, currentSize) * origValue;
+    }
+
+    public static double getRatio(double origSize, double currentSize) {
+        return (currentSize / origSize);
+    }
+    //size is considered from 0-origsize as 0-1.
+
+    //scaling end
+    public BasePainter(BasicComponentSplashScreen master) {
+        this(master, false);
+    }
+
+    public BasePainter(BasicComponentSplashScreen master, boolean startAnimation) {
+        //to have this in inner classes
+        this.master = master;
+        setColors();
+        adjustForSize(master.getPluginWidth(), master.getPluginHeight());
+        if (startAnimation) {
+            startAnimationThreads();
+        }
+
+    }
+
+    public void increaseAnimationPosition() {
+        animationsPosition += greyTextIncrment;
+    }
+
+    protected void ensurePrerenderedStuff() {
+        if (this.prerenderedStuff == null) {
+            this.prerenderedStuff = prerenderStill();
+        }
+    }
+
+    public void paint(Graphics g) {
+        Graphics2D g2d = (Graphics2D) g;
+        ensurePrerenderedStuff();
+        if (prerenderedStuff != null) {
+            g2d.drawImage(prerenderedStuff, 0, 0, null);
+        }
+
+        if (showNiceTexts) {
+            paintNiceTexts(g2d);
+        } else {
+            paintPlainTexts(g2d);
+        }
+
+
+
+    }
+
+    public final void adjustForSize(int width, int height) {
+        prepareFonts(width, height);
+        //enablings depends on fonts
+        setEnablings(width, height, master.getVersion(), master.getInformationContent(), (Graphics2D) (master.getGraphics()));
+        prerenderedStuff = prerenderStill();
+    }
+
+    private void setEnablings(int w, int h, String version, InformationElement ic, Graphics2D g2d) {
+        showLeaf = true;
+        if (w > 0 && h > 0) {
+            //leaf stretch much better to wide then to high
+            if (h / w > 2 || w / h > 6) {
+                showLeaf = false;
+            }
+        }
+        showInfo = true;
+        if (version != null && g2d != null && ic != null && ic.getHeader() != null && ic.getHeader().size() > 0) {
+            String s = ic.getHeader().get(0);
+            FontMetrics fm = g2d.getFontMetrics(plainTextsFont);
+            int versionLength = fm.stringWidth(version);
+            int firsDescLineLengthg = fm.stringWidth(s);
+            if (firsDescLineLengthg > w - versionLength - 10) {
+                showInfo = false;
+            }
+        }
+        if (Math.min(h, w) < Toolkit.getDefaultToolkit().getScreenSize().getHeight() / 10) {
+            showNiceTexts = false;
+        } else {
+            showNiceTexts = true;
+        }
+    }
+
+    public final void startAnimationThreads() {
+        Thread tt = getMoovingTextThread();
+        tt.start();
+        Thread t = getWatterLevelThread();
+        t.start();
+    }
+
+    private void prepareFonts(int w, int h) {
+        master.setPluginHeight(h);
+        master.setPluginWidth(w);
+        Map<TextAttribute, Object> teaFontAttributes = new HashMap<TextAttribute, Object>();
+        teaFontAttributes.put(TextAttribute.SIZE, new Integer(scaleMin(84)));
+        teaFontAttributes.put(TextAttribute.WIDTH, new Double((0.95)));
+        teaFontAttributes.put(TextAttribute.FAMILY, "Serif");
+        teaFont = new Font(teaFontAttributes);
+        Map<TextAttribute, Object> icedFontAttributes = new HashMap<TextAttribute, Object>();
+        icedFontAttributes.put(TextAttribute.SIZE, new Integer(scaleMin(82)));
+        icedFontAttributes.put(TextAttribute.WIDTH, new Double((0.80)));
+        icedFontAttributes.put(TextAttribute.FAMILY, "Serif");
+        icedFont = new Font(icedFontAttributes);
+        Map<TextAttribute, Object> webFontAttributes = new HashMap<TextAttribute, Object>();
+        webFontAttributes.put(TextAttribute.SIZE, new Integer(scaleMin(41)));
+        webFontAttributes.put(TextAttribute.WIDTH, new Double((2)));
+        webFontAttributes.put(TextAttribute.FAMILY, "Serif");
+        webFont = new Font(webFontAttributes);
+        Map<TextAttribute, Object> pluginFontAttributes = new HashMap<TextAttribute, Object>();
+        pluginFontAttributes.put(TextAttribute.SIZE, new Integer(scaleMin(32)));
+        pluginFontAttributes.put(TextAttribute.WEIGHT, new Double((5d)));
+        pluginFontAttributes.put(TextAttribute.WIDTH, new Double((0.9)));
+        pluginFontAttributes.put(TextAttribute.FAMILY, "Serif");
+        pluginFont = new Font(pluginFontAttributes);
+        Map<TextAttribute, Object> plainFontAttributes = new HashMap<TextAttribute, Object>();
+        plainFontAttributes.put(TextAttribute.SIZE, new Integer(12));
+        plainFontAttributes.put(TextAttribute.FAMILY, "Monospaced");
+        plainTextsFont = new Font(plainFontAttributes);
+        Map<TextAttribute, Object> alternativeTextFontAttributes = new HashMap<TextAttribute, Object>();
+        alternativeTextFontAttributes.put(TextAttribute.SIZE, Math.min(w, h) / 5);
+        alternativeTextFontAttributes.put(TextAttribute.WIDTH, new Double((0.7)));
+        alternativeTextFontAttributes.put(TextAttribute.FAMILY, "Monospaced");
+        alternativeTextFont = new Font(alternativeTextFontAttributes);
+
+    }
+
+    private void setColors() {
+
+        teaColor = teaLiveColor;
+        backgroundColor = backgroundLiveColor;
+        teaLeafsStalksColor = teaLeafsStalksLiveColor;
+        pluginColor = pluginLiveColor;
+        waterColor = waterLiveColor;
+        plainTextColor = plainTextLiveColor;
+
+    }
+
+    protected BufferedImage prerenderStill() {
+        if (master.getPluginWidth() <= 0 || master.getPluginHeight() <= 0) {
+            return null;
+        }
+        BufferedImage bi = new BufferedImage(master.getPluginWidth(), master.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        paintStillTo(bi.createGraphics(), master.getInformationContent(), master.getVersion());
+        return bi;
+    }
+
+    protected void paintStillTo(Graphics2D g2d, InformationElement ic, String version) {
+        RenderingHints r = g2d.getRenderingHints();
+        drawBase(g2d, ic, version);
+        g2d.setRenderingHints(r);
+    }
+
+    protected void drawTextAroundCenter(Graphics2D g2d, double heightOffset, String msg) {
+
+        int y = (master.getPluginHeight() / 2) + (g2d.getFontMetrics().getHeight() / 2 + (int) (heightOffset * g2d.getFontMetrics().getHeight()));
+        int x = (master.getPluginWidth() / 2) - (g2d.getFontMetrics().stringWidth(msg) / 2);
+        g2d.drawString(msg, x, y);
+    }
+
+    private Thread getMoovingTextThread() {
+        Thread tt = new Thread() {
+
+            @Override
+            public void run() {
+                while (master.isAnimationRunning()) {
+                    try {
+                        SwingUtilities.invokeAndWait(new Runnable() {
+                            @Override
+                            public void run() {
+                                animationsPosition += greyTextIncrment;
+                                if (animationsPosition > 10000) {
+                                    animationsPosition = 1;
+                                }
+                                // Force repaint
+                                master.repaint();
+                            }
+                        });
+                        Thread.sleep(150);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        };
+        tt.setDaemon(true);
+        return tt;
+    }
+
+    private Thread getWatterLevelThread() {
+        // Create a new thread to increment spinFactor and repaint
+        Thread t = new Thread() {
+
+            @Override
+            public void run() {
+                while (master.isAnimationRunning()) {
+                    if (waterLevel > 120) {
+                        break;
+                    }
+                    try {
+                        SwingUtilities.invokeAndWait(new Runnable() {
+
+                            @Override
+                            public void run() {
+                                waterLevel += 2;
+                                master.repaint();
+                            }
+                        });
+                        Thread.sleep((waterLevel / 4) * 30);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        };
+        t.setDaemon(true);
+        return t;
+    }
+
+    private String getAlternativeProduktName() {
+        if (SplashReason.JAVAWS.equals(master.getSplashReason())) {
+            return alternativeWeb;
+        } else if (SplashReason.APPLET.equals(master.getSplashReason())) {
+            return alternativeWeb + alternativePlugin;
+        } else {
+            return "....";
+        }
+    }
+
+    protected FontMetrics drawBase(Graphics2D g2d, InformationElement ic, String version) {
+        g2d.setColor(backgroundColor);
+        g2d.fillRect(0, 0, master.getPluginWidth() + 5, master.getPluginHeight() + 5);
+        if (showNiceTexts) {
+            //g2d.drawImage(tmpBackround, 0, 0, null);
+            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+            g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+            g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+            g2d.setFont(teaFont);
+            g2d.setColor(teaColor);
+            g2d.drawString(tea, scaleX(42) + g2d.getFontMetrics(icedFont).stringWidth(ICED), scaleY(278));
+            g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
+            if (showLeaf) {
+                g2d.fillPolygon(SplinesDefs.getMainLeafCurve(getRatioX(), getRatioY()));
+            }
+            if (showLeaf) {
+                g2d.fillPolygon(SplinesDefs.getSecondLeafCurve(getRatioX(), getRatioY()));
+            }
+            g2d.setColor(teaLeafsStalksColor);
+            if (showLeaf) {
+                g2d.fillPolygon(SplinesDefs.getMainLeafStalkCurve(getRatioX(), getRatioY()));
+            }
+            if (showLeaf) {
+                g2d.fillPolygon(SplinesDefs.getSecondLeafStalkCurve(getRatioX(), getRatioY()));
+            }
+            g2d.setFont(pluginFont);
+            g2d.setColor(pluginColor);
+            if (SplashReason.APPLET.equals(master.getSplashReason())) {
+                if (showLeaf) {
+                    g2d.drawString(plugin, scaleX(404), scaleY(145));
+                } else {
+                    FontMetrics wfm = g2d.getFontMetrics(webFont);
+                    g2d.drawString(plugin, wfm.stringWidth(web) + scaleX(WEB_LEFT_ALIGMENT) + 10, scaleY(WEB_TOP_ALIGMENT));
+                }
+            }
+            g2d.setFont(plainTextsFont);
+            g2d.setColor(plainTextColor);
+            FontMetrics fm = g2d.getFontMetrics();
+            if (ic != null) {
+                InfoItem des = ic.getBestMatchingDescriptionForSplash();
+                List<String> head = ic.getHeader();
+                if (head != null && showInfo) {
+                    for (int i = 0; i < head.size(); i++) {
+                        String string = head.get(i);
+                        g2d.drawString(string, 5, (i + 1) * fm.getHeight());
+                    }
+                }
+                if (des != null && des.getValue() != null) {
+                    g2d.drawString(des.getValue(), 5, master.getPluginHeight() - fm.getHeight());
+                }
+            }
+        }
+        g2d.setFont(plainTextsFont);
+        g2d.setColor(plainTextColor);
+        FontMetrics fm = g2d.getFontMetrics();
+        if (version != null) {
+            int y = master.getPluginWidth() - fm.stringWidth(version + " ");
+            if (y < 0) {
+                y = 0;
+            }
+            g2d.drawString(version, y, fm.getHeight());
+        }
+        return fm;
+    }
+
+    public int getWaterLevel() {
+        return waterLevel;
+    }
+
+    public void setWaterLevel(int level) {
+        this.waterLevel = level;
+    }
+
+    public int getAnimationsPosition() {
+        return animationsPosition;
+    }
+
+    public void clearCachedWaterTextImage() {
+        oldTwl = null;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurve.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurve.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,184 @@
+/* ControlCurve.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+/** This class represents a curve defined by a sequence of control points */
+/*  Part of NatCubic implementation, inspire by http://www.cse.unsw.edu.au/~lambert/*/
+import java.awt.*;
+
+public class ControlCurve {
+
+    protected Polygon pts;
+    protected Polygon result;
+    protected boolean withPoints = true;
+    protected int selection = -1;
+
+    public ControlCurve() {
+        pts = new Polygon();
+    }
+
+    public ControlCurve(Polygon p) {
+        pts = p;
+    }
+
+    public Polygon getSourcePolygon() {
+        return pts;
+    }
+
+    public void setSourcePolygon(Polygon pts) {
+        this.pts = pts;
+    }
+    static Font f = new Font("Courier", Font.PLAIN, 12);
+
+    /**
+     * to be overwriten
+     */
+    public Polygon calcualteResult() {
+        return null;
+    }
+
+    public void calcualteAndSaveResult() {
+        result = calcualteResult();
+    }
+
+    /** paint this curve into g.*/
+    public void paint(Graphics g) {
+        if (isWithPoints()) {
+            FontMetrics fm = g.getFontMetrics(f);
+            g.setFont(f);
+            int h = fm.getAscent() / 2;
+
+            for (int i = 0; i < pts.npoints; i++) {
+                String s = Integer.toString(i);
+                int w = fm.stringWidth(s) / 2;
+                g.drawString(Integer.toString(i), pts.xpoints[i] - w, pts.ypoints[i] + h);
+            }
+        }
+    }
+    static final int EPSILON = 36;  /* square of distance for picking */
+
+
+    /** return index of control point near to (x,y) or -1 if nothing near */
+    public int selectPoint(int x, int y) {
+        int mind = Integer.MAX_VALUE;
+        selection = -1;
+        for (int i = 0; i < pts.npoints; i++) {
+            int d = sqr(pts.xpoints[i] - x) + sqr(pts.ypoints[i] - y);
+            if (d < mind && d < EPSILON) {
+                mind = d;
+                selection = i;
+            }
+        }
+        return selection;
+    }
+
+    // square of an int
+    static int sqr(int x) {
+        return x * x;
+    }
+
+    public Polygon getResult() {
+        return result;
+    }
+
+    public void resetResult() {
+        this.result = null;
+    }
+
+    /** add a control point, return index of new control point */
+    public int addPoint(int x, int y) {
+        pts.addPoint(x, y);
+        resetResult();
+        return selection = pts.npoints - 1;
+    }
+
+    /** set selected control point */
+    public void setPoint(int x, int y) {
+        setPoint(selection, x, y);
+    }
+
+    /** set selected control point */
+    public void setPoint(int index, int x, int y) {
+        if (index >= 0 && index < pts.npoints) {
+            pts.xpoints[index] = x;
+            pts.ypoints[index] = y;
+            resetResult();
+        }
+    }
+
+    /** remove selected control point */
+    public void removePoint(int index) {
+        if (index >= 0 && index < pts.npoints) {
+            pts.npoints--;
+            for (int i = index; i < pts.npoints; i++) {
+                pts.xpoints[i] = pts.xpoints[i + 1];
+                pts.ypoints[i] = pts.ypoints[i + 1];
+            }
+            resetResult();
+        }
+    }
+
+    /** remove selected control point */
+    public void removePoint() {
+        removePoint(selection);
+    }
+
+    public boolean isWithPoints() {
+        return withPoints;
+    }
+
+    public void setWithPoints(boolean withPoints) {
+        this.withPoints = withPoints;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder r = new StringBuilder();
+        for (int i = 0; i < pts.npoints; i++) {
+            r.append(" ").append(pts.xpoints[i]).append(" ").append(pts.ypoints[i]);
+        }
+        return r.toString();
+    }
+
+    /**
+     * for testing purposes
+     * @param selection
+     */
+    void setSelection(int selection) {
+        this.selection = selection;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/Cubic.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/Cubic.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,57 @@
+/* Cubic.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+/** this class represents a cubic polynomial */
+/*  Part of NatCubic implementation, inspire by http://www.cse.unsw.edu.au/~lambert/*/
+public class Cubic {
+
+    float a, b, c, d;         /* a + b*u + c*u^2 +d*u^3 */
+
+
+    public Cubic(float a, float b, float c, float d) {
+        this.a = a;
+        this.b = b;
+        this.c = c;
+        this.d = d;
+    }
+
+    /** evaluate cubic */
+    public float eval(float u) {
+        return (((d * u) + c) * u + b) * u + a;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainter.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainter.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,259 @@
+/* ErrorPainter.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.*;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.RenderingHints;
+
+import javax.swing.SwingUtilities;
+import net.sourceforge.jnlp.runtime.Translator;
+import net.sourceforge.jnlp.splashscreen.parts.BasicComponentSplashScreen;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
+
+public final class ErrorPainter extends BasePainter {
+
+    //colors
+    private static final Color teaDeadColor = Color.darkGray;
+    private static final Color backgroundDeadColor = Color.gray;
+    private static final Color teaLeafsStalksDeadColor = new Color(100, 100, 100);
+    private static final Color pluginDeadColor = Color.darkGray;
+    private static final Color waterDeadColor = Color.darkGray;
+    private static final Color plainTextDeadColor = Color.white;
+    private static final String errorMessageKey = "SPLASHerror";
+    private static final String errorScreamMessageKey = "SPLASH_ERROR";
+    private static final Color errorScreamColor = Color.red;
+    //for clicking ot error message
+    private Point errorCorner = null;
+    private boolean errorIsScreamed = false;
+    private int errorScreamedPercentage = 100;
+
+    /**
+     * Interpolation is root ratior is r= (currentSize / origSize)
+     * then value to-from is interpolaed from to to from accroding to ratio
+     *
+     * @param origSize
+     * @param currentSize
+     * @param from
+     * @param to
+     * @return
+     */
+    public static double interpol(double origSize, double currentSize, double from, double to) {
+        return getRatio(origSize, currentSize) * (to - from) + from;
+    }
+
+    /**
+     * is interpolating one color to another based on ration current/orig
+     * Each (r,g,b,a) part of color is interpolated separately
+     * resturned is new color composed form new r,g,b,a
+     * @param origSize
+     * @param currentSize
+     * @param from
+     * @param to
+     * @return
+     */
+    public static Color interpolColor(double origSize, double currentSize, Color from, Color to) {
+        double r = interpol(origSize, currentSize, to.getRed(), from.getRed());
+        double g = interpol(origSize, currentSize, to.getGreen(), from.getGreen());
+        double b = interpol(origSize, currentSize, to.getBlue(), from.getBlue());
+        double a = interpol(origSize, currentSize, to.getAlpha(), from.getAlpha());
+        return new Color((int) r, (int) g, (int) b, (int) a);
+    }
+    //scaling end
+
+    public ErrorPainter(BasicComponentSplashScreen master) {
+        this(master, false);
+    }
+
+    public ErrorPainter(BasicComponentSplashScreen master, boolean startScream) {
+        super(master);
+        if (startScream) {
+            startErrorScream();
+        }
+
+    }
+
+    public void startErrorScream() {
+
+        errorIsScreamed = true;
+        getErrorScreamThread().start();
+        //are done after error scream
+        //setColors();
+        //prerenderedStuff = prerenderStill();
+
+    }
+
+    @Override
+    public void paint(Graphics g) {
+        Graphics2D g2d = (Graphics2D) g;
+        ensurePrerenderedStuff();
+        if (errorIsScreamed) {
+            paintStillTo(g2d, master.getInformationContent(), master.getVersion());
+        } else {
+            if (prerenderedStuff != null) {
+                g2d.drawImage(prerenderedStuff, 0, 0, null);
+            }
+        }
+
+        if (super.showNiceTexts) {
+            paintNiceTexts(g2d);
+        } else {
+            paintPlainTexts(g2d);
+        }
+
+        if (errorIsScreamed) {
+            g2d.setClip(0, 0, master.getPluginWidth(), master.getPluginHeight());
+            drawBigError(g2d);
+        }
+
+
+    }
+
+    private void drawBigError(Graphics2D g2d) {
+        Font f = new Font("Serif", Font.PLAIN, (int) scale(100, errorScreamedPercentage, master.getPluginHeight()));
+        g2d.setColor(errorScreamColor);
+        g2d.setFont(f);
+        drawTextAroundCenter(g2d, 0, getErrorScreamMessage());
+    }
+
+    public Point getErrorCorner() {
+        return errorCorner;
+    }
+
+    private void setColors() {
+
+        teaColor = teaDeadColor;
+        backgroundColor = backgroundDeadColor;
+        teaLeafsStalksColor = teaLeafsStalksDeadColor;
+        pluginColor = pluginDeadColor;
+        waterColor = waterDeadColor;
+
+    }
+
+    private void interpoleColors(int origSize, int currentSize) {
+        teaColor = interpolColor(origSize, currentSize, teaLiveColor, teaDeadColor);
+        backgroundColor = interpolColor(origSize, currentSize, backgroundLiveColor, backgroundDeadColor);
+        teaLeafsStalksColor = interpolColor(origSize, currentSize, teaLeafsStalksLiveColor, teaLeafsStalksDeadColor);
+        pluginColor = interpolColor(origSize, currentSize, pluginLiveColor, pluginDeadColor);
+        waterColor = interpolColor(origSize, currentSize, waterLiveColor, waterDeadColor);
+        plainTextColor = interpolColor(origSize, currentSize, plainTextLiveColor, plainTextDeadColor);
+    }
+
+    @Override
+    protected void paintStillTo(Graphics2D g2d, InformationElement ic, String version) {
+        RenderingHints r = g2d.getRenderingHints();
+        FontMetrics fm = drawBase(g2d, ic, version);
+        drawError(g2d, ic, version, fm);
+        g2d.setRenderingHints(r);
+    }
+
+    private String getErrorMessage() {
+        String localised = Translator.R(errorMessageKey);
+        //if (localised==null)return errorMessage;
+        return localised;
+    }
+
+    private String getErrorScreamMessage() {
+        String localised = Translator.R(errorScreamMessageKey);
+        //if (localised==null)return  errorScreamMessage;
+        return localised;
+    }
+
+    private Thread getErrorScreamThread() {
+        // Create a new thread to screem error for failure
+        Thread t = new Thread() {
+
+            @Override
+            public void run() {
+                try {
+                    while (errorIsScreamed) {
+                        errorScreamedPercentage -= 3;
+                        interpoleColors(100, errorScreamedPercentage);
+                        if (errorScreamedPercentage <= 5) {
+                            errorIsScreamed = false;
+                            setColors();
+                            prerenderedStuff = null;
+                        }
+                        SwingUtilities.invokeAndWait(new Runnable() {
+
+                            @Override
+                            public void run() {
+                                master.repaint();
+                            }
+                        });
+                        Thread.sleep(75);
+                        if (errorScreamedPercentage < 90 && errorScreamedPercentage > 80) {
+                            clearCachedWaterTextImage();
+                            canWave = false;
+                        }
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                } finally {
+                    canWave = true;
+                    errorIsScreamed = false;
+                    setColors();
+                    prerenderedStuff = null;
+                    master.repaint();
+
+                }
+            }
+        };
+        t.setDaemon(true);
+        return t;
+    }
+
+    private void drawError(Graphics2D g2d, InformationElement ic, String version, FontMetrics fm) {
+        int minh = fm.getHeight();
+        int minw = fm.stringWidth(getErrorMessage());
+        int space = 5;
+        g2d.setColor(backgroundColor);
+        errorCorner = new Point(master.getPluginWidth() - space * 4 - minw, master.getPluginHeight() - space * 4 - minh);
+        if (errorCorner.x < 0) {
+            errorCorner.x = 0;
+        }
+        g2d.fillRect(errorCorner.x, errorCorner.y, space * 4 + minw, space * 4 + minh);
+        g2d.setColor(plainTextColor);
+        g2d.drawRect(errorCorner.x + space, errorCorner.y + space, space * 2 + minw, space * 2 + minh);
+        g2d.drawString(getErrorMessage(), errorCorner.x + 2 * space, errorCorner.y + 5 * space);
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ImageFontCutter.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ImageFontCutter.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,152 @@
+/* ImageFontCutter.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.Shape;
+import java.awt.font.FontRenderContext;
+import java.awt.font.TextLayout;
+import java.awt.geom.AffineTransform;
+
+public class ImageFontCutter {
+
+    private Image img;
+    private Font font;
+    private Color textOutline;
+    private final String text;
+
+    public ImageFontCutter(Font f, String s) {
+        this.font = f;
+        textOutline = Color.black;
+        this.text = s;
+
+    }
+
+    public ImageFontCutter(Font f, String s, Color textOutline) {
+        this(f, s);
+        this.textOutline = textOutline;
+    }
+
+    public int getWidth() {
+        if (img == null) {
+            return -1;
+        }
+        return img.getWidth(null);
+    }
+
+    public int getHeight() {
+        if (img == null) {
+            return -1;
+        }
+        return img.getHeight(null);
+    }
+
+    public void cutTo(Graphics2D g2, int x, int y) {
+        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+                RenderingHints.VALUE_ANTIALIAS_ON);
+
+        g2.setRenderingHint(RenderingHints.KEY_RENDERING,
+                RenderingHints.VALUE_RENDER_QUALITY);
+
+        FontRenderContext frc = g2.getFontRenderContext();
+        TextLayout tl = new TextLayout(getText(), getFont(), frc);
+        float sw = (float) tl.getBounds().getWidth();
+        AffineTransform transform = new AffineTransform();
+        transform.setToTranslation(x, y);
+        Shape shape = tl.getOutline(transform);
+        Rectangle r = shape.getBounds();
+        g2.setColor(getTextOutline());
+        g2.draw(shape);
+        g2.setClip(shape);
+        g2.drawImage(getImg(), r.x, r.y, r.width, r.height, null);
+
+    }
+
+    /**
+     * @return the img
+     */
+    public Image getImg() {
+        return img;
+    }
+
+    /**
+     * @param img the img to set
+     */
+    public void setImg(Image img) {
+        this.img = img;
+    }
+
+    /**
+     * @return the font
+     */
+    public Font getFont() {
+        return font;
+    }
+
+    /**
+     * @param font the font to set
+     */
+    public void setFont(Font font) {
+        this.font = font;
+    }
+
+    /**
+     * @return the textOutline
+     */
+    public Color getTextOutline() {
+        return textOutline;
+    }
+
+    /**
+     * @param textOutline the textOutline to set
+     */
+    public void setTextOutline(Color textOutline) {
+        this.textOutline = textOutline;
+    }
+
+    /**
+     * @return the text
+     */
+    public String getText() {
+        return text;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingText.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingText.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,77 @@
+/* MovingText.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.GradientPaint;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.image.BufferedImage;
+
+public class MovingText extends TextWithWaterLevel {
+
+    public MovingText(String s, Font f) {
+        super(s, f);
+
+    }
+
+    @Override
+    public BufferedImage getBackground() {
+        Point p = getFutureSize();
+        int w = p.x;
+        int h = p.y;
+        if (w <= 0 || h <= 0) {
+            return null;
+        }
+        BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bi.createGraphics();
+
+        Color e1 = Color.gray;
+        Color s1 = Color.white;
+        int level = getPercentageOfWater() % (2 * w);
+        GradientPaint gradient = new GradientPaint(level - w, h / 2, s1, level, h / 2, e1, true);
+        g2d.setPaint(gradient);
+        g2d.fillRect(100, 100, 200, 120);
+
+        g2d.fillRect(0, 0, w, h);
+
+
+
+        return bi;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubic.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubic.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,121 @@
+/* NatCubic.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.*;
+
+public class NatCubic extends ControlCurve {
+
+    /* This calcualtion was insipred by http://www.cse.unsw.edu.au/~lambert/
+    NatCubic calcualtion
+    calculates the natural cubic spline that interpolates
+    y[0], y[1], ... y[n]
+    The first segment is returned as
+    C[0].a + C[0].b*u + C[0].c*u^2 + C[0].d*u^3 0<=u <1
+    the other segments are in C[1], C[2], ...  C[n-1] */
+    Cubic[] calcNaturalCubic(int n, int[] x) {
+        float[] gamma = new float[n + 1];
+        float[] delta = new float[n + 1];
+        float[] D = new float[n + 1];
+        int i;
+        /* We solve the equation
+        [2 1       ] [D[0]]   [3(x[1] - x[0])  ]
+        |1 4 1     | |D[1]|   |3(x[2] - x[0])  |
+        |  1 4 1   | | .  | = |      .         |
+        |    ..... | | .  |   |      .         |
+        |     1 4 1| | .  |   |3(x[n] - x[n-2])|
+        [       1 2] [D[n]]   [3(x[n] - x[n-1])]
+
+        by using row operations to convert the matrix to upper triangular
+        and then back sustitution.  The D[i] are the derivatives at the knots.
+         */
+
+        gamma[0] = 1.0f / 2.0f;
+        for (i = 1; i < n; i++) {
+            gamma[i] = 1 / (4 - gamma[i - 1]);
+        }
+        gamma[n] = 1 / (2 - gamma[n - 1]);
+
+        delta[0] = 3 * (x[1] - x[0]) * gamma[0];
+        for (i = 1; i < n; i++) {
+            delta[i] = (3 * (x[i + 1] - x[i - 1]) - delta[i - 1]) * gamma[i];
+        }
+        delta[n] = (3 * (x[n] - x[n - 1]) - delta[n - 1]) * gamma[n];
+
+        D[n] = delta[n];
+        for (i = n - 1; i >= 0; i--) {
+            D[i] = delta[i] - gamma[i] * D[i + 1];
+        }
+
+        /* now compute the coefficients of the cubics */
+        Cubic[] C = new Cubic[n];
+        for (i = 0; i < n; i++) {
+            C[i] = new Cubic((float) x[i], D[i], 3 * (x[i + 1] - x[i]) - 2 * D[i] - D[i + 1],
+                    2 * (x[i] - x[i + 1]) + D[i] + D[i + 1]);
+        }
+        return C;
+    }
+    final int STEPS = 12;
+
+    /* draw a cubic spline */
+    @Override
+    public void paint(Graphics g) {
+        super.paint(g);
+        if (pts.npoints >= 2) {
+            if (getResult() == null) {
+                calcualteAndSaveResult();
+            }
+            g.drawPolyline(result.xpoints, result.ypoints, result.npoints);
+        }
+    }
+
+    @Override
+    public Polygon calcualteResult() {
+        Cubic[] X = calcNaturalCubic(pts.npoints - 1, pts.xpoints);
+        Cubic[] Y = calcNaturalCubic(pts.npoints - 1, pts.ypoints);
+        /* very crude technique - just break each segment up into steps lines */
+        Polygon p = new Polygon();
+        p.addPoint((int) Math.round(X[0].eval(0)), (int) Math.round(Y[0].eval(0)));
+        for (int i = 0; i < X.length; i++) {
+            for (int j = 1; j <= STEPS; j++) {
+                float u = j / (float) STEPS;
+                p.addPoint(Math.round(X[i].eval(u)), Math.round(Y[i].eval(u)));
+            }
+        }
+        return p;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosed.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosed.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,101 @@
+/* NatCubicClosed.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+public class NatCubicClosed extends NatCubic {
+
+    /* This calcualtion was insipred by http://www.cse.unsw.edu.au/~lambert/
+    NatCubic calcualtion
+    calculates the closed natural cubic spline that interpolates
+    x[0], x[1], ... x[n]
+    The first segment is returned as
+    C[0].a + C[0].b*u + C[0].c*u^2 + C[0].d*u^3 0<=u <1
+    the other segments are in C[1], C[2], ...  C[n] */
+    @Override
+    Cubic[] calcNaturalCubic(int n, int[] x) {
+        float[] w = new float[n + 1];
+        float[] v = new float[n + 1];
+        float[] y = new float[n + 1];
+        float[] D = new float[n + 1];
+        float z, F, G, H;
+        int k;
+        /* We solve the equation
+        [4 1      1] [D[0]]   [3(x[1] - x[n])  ]
+        |1 4 1     | |D[1]|   |3(x[2] - x[0])  |
+        |  1 4 1   | | .  | = |      .         |
+        |    ..... | | .  |   |      .         |
+        |     1 4 1| | .  |   |3(x[n] - x[n-2])|
+        [1      1 4] [D[n]]   [3(x[0] - x[n-1])]
+
+        by decomposing the matrix into upper triangular and lower matrices
+        and then back sustitution.  See Spath "Spline Algorithms for Curves
+        and Surfaces" pp 19--21. The D[i] are the derivatives at the knots.
+         */
+        w[1] = v[1] = z = 1.0f / 4.0f;
+        y[0] = z * 3 * (x[1] - x[n]);
+        H = 4;
+        F = 3 * (x[0] - x[n - 1]);
+        G = 1;
+        for (k = 1; k < n; k++) {
+            v[k + 1] = z = 1 / (4 - v[k]);
+            w[k + 1] = -z * w[k];
+            y[k] = z * (3 * (x[k + 1] - x[k - 1]) - y[k - 1]);
+            H = H - G * w[k];
+            F = F - G * y[k - 1];
+            G = -v[k] * G;
+        }
+        H = H - (G + 1) * (v[n] + w[n]);
+        y[n] = F - (G + 1) * y[n - 1];
+
+        D[n] = y[n] / H;
+        D[n - 1] = y[n - 1] - (v[n] + w[n]) * D[n]; /* This equation is WRONG! in my copy of Spath */
+        for (k = n - 2; k >= 0; k--) {
+            D[k] = y[k] - v[k + 1] * D[k + 1] - w[k + 1] * D[n];
+        }
+
+
+        /* now compute the coefficients of the cubics */
+        Cubic[] C = new Cubic[n + 1];
+        for (k = 0; k < n; k++) {
+            C[k] = new Cubic((float) x[k], D[k], 3 * (x[k + 1] - x[k]) - 2 * D[k] - D[k + 1],
+                    2 * (x[k] - x[k + 1]) + D[k] + D[k + 1]);
+        }
+        C[n] = new Cubic((float) x[n], D[n], 3 * (x[0] - x[n]) - 2 * D[n] - D[0],
+                2 * (x[n] - x[0]) + D[n] + D[0]);
+        return C;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefs.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefs.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,198 @@
+/* SplinesDefs.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.Point;
+import java.awt.Polygon;
+
+public class SplinesDefs {
+
+    private final static Point[] mainLeafArray = {
+        new Point(268, 307),
+        new Point(274, 326),
+        new Point(289, 337),
+        new Point(317, 349),
+        new Point(362, 350),
+        new Point(413, 334),
+        new Point(428, 326),
+        new Point(453, 309),
+        new Point(469, 292),
+        new Point(496, 264),
+        new Point(516, 236),
+        new Point(531, 215),
+        new Point(550, 185),
+        new Point(567, 155),
+        new Point(580, 130),
+        new Point(571, 139),
+        new Point(555, 148),
+        new Point(540, 157),
+        new Point(521, 167),
+        new Point(502, 174),
+        new Point(477, 183),
+        new Point(443, 193),
+        new Point(413, 201),
+        new Point(392, 209),
+        new Point(376, 218),
+        new Point(363, 228),
+        new Point(356, 250),
+        new Point(372, 231),
+        new Point(398, 218),
+        new Point(420, 209),
+        new Point(446, 200),
+        new Point(479, 192),
+        new Point(505, 182),
+        new Point(547, 168),
+        new Point(539, 182),
+        new Point(526, 204),
+        new Point(509, 227),
+        new Point(498, 244),
+        new Point(486, 257),
+        new Point(469, 272),
+        new Point(460, 281),
+        new Point(449, 293),
+        new Point(436, 303),
+        new Point(418, 315),
+        new Point(400, 323),
+        new Point(383, 332),
+        new Point(367, 334),
+        new Point(343, 338),
+        new Point(322, 335),
+        new Point(304, 330),
+        new Point(288, 322)
+    };
+    private final static Point[] mainLeafStalkArray = {
+        new Point(353, 287),
+        new Point(366, 295),
+        new Point(376, 291),
+        new Point(392, 283),
+        new Point(428, 251),
+        new Point(441, 233),
+        new Point(462, 217),
+        new Point(446, 225),
+        new Point(434, 236),
+        new Point(428, 242),
+        new Point(408, 261),
+        new Point(392, 275),
+        new Point(373, 284),
+        new Point(363, 289)
+    };
+    private final static Point[] smallLeafArray = {
+        new Point(342, 207),
+        new Point(352, 213),
+        new Point(360, 218),
+        new Point(374, 217),
+        new Point(389, 202),
+        new Point(397, 175),
+        new Point(396, 143),
+        new Point(397, 113),
+        new Point(380, 127),
+        new Point(350, 145),
+        new Point(327, 155),
+        new Point(313, 166),
+        new Point(297, 182),
+        new Point(293, 196),
+        new Point(308, 183),
+        new Point(332, 167),
+        new Point(364, 150),
+        new Point(385, 137),
+        new Point(384, 158),
+        new Point(382, 187),
+        new Point(371, 204)
+    };
+    private final static Point[] smallLeafStalkArray = {
+        new Point(320, 203),
+        new Point(331, 191),
+        new Point(345, 185),
+        new Point(356, 183),
+        new Point(365, 177),
+        new Point(368, 171),
+        new Point(368, 165),
+        new Point(360, 173),
+        new Point(354, 176),
+        new Point(341, 180),
+        new Point(334, 184),
+        new Point(321, 194)
+    };
+
+    public static Polygon getMainLeaf(Double scalex, double scaley) {
+
+        return polygonizeControlPoints(mainLeafArray, scalex, scaley);
+    }
+
+    static Polygon polygonizeControlPoints(Point[] pp, Double scalex, double scaley) {
+        Polygon r = new Polygon();
+        for (int i = 0; i < pp.length; i++) {
+            Point p = pp[i];
+            r.addPoint((int) ((double) p.x * (double) scalex), (int) ((double) p.y * (double) scaley));
+        }
+        return r;
+    }
+
+    public static Polygon getSecondLeaf(Double scalex, double scaley) {
+        return polygonizeControlPoints(smallLeafArray, scalex, scaley);
+    }
+
+    public static Polygon getSecondLeafStalk(Double scalex, double scaley) {
+        return polygonizeControlPoints(smallLeafStalkArray, scalex, scaley);
+    }
+
+    public static Polygon getMainLeafStalk(Double scalex, double scaley) {
+        return polygonizeControlPoints(mainLeafStalkArray, scalex, scaley);
+    }
+
+    public static Polygon getMainLeafCurve(Double scalex, double scaley) {
+        return getNatCubicClosed(getMainLeaf(scalex, scaley));
+    }
+
+    public static Polygon getMainLeafStalkCurve(Double scalex, double scaley) {
+        return getNatCubicClosed(getMainLeafStalk(scalex, scaley));
+    }
+
+    public static Polygon getSecondLeafCurve(Double scalex, double scaley) {
+        return getNatCubicClosed(getSecondLeaf(scalex, scaley));
+    }
+
+    public static Polygon getSecondLeafStalkCurve(Double scalex, double scaley) {
+        return getNatCubicClosed(getSecondLeafStalk(scalex, scaley));
+    }
+
+    static Polygon getNatCubicClosed(Polygon p) {
+        NatCubicClosed c = new NatCubicClosed();
+        c.setSourcePolygon(p);
+        return c.calcualteResult();
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevel.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevel.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,179 @@
+/* TextWithWaterLevel.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.Polygon;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.RenderingHints;
+import java.awt.image.BufferedImage;
+import java.util.Random;
+
+public class TextWithWaterLevel extends ImageFontCutter {
+
+    private Color waterColor;
+    private Color bgColor;
+    private int percentageOfWater;
+    private Random sea = new Random();
+    //set to null befor getBackground if waving is needed
+    //or create new TWL ;)
+    private Polygon cachedPolygon;
+
+    public TextWithWaterLevel(String s, Font f) {
+        super(f, s);
+        waterColor = Color.BLUE;
+        bgColor = Color.white;
+
+    }
+
+    protected Point getFutureSize() {
+        BufferedImage bi = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+        FontMetrics fm = bi.createGraphics().getFontMetrics(getFont());
+        int w = fm.stringWidth(getText());
+        int h = fm.getHeight();
+        return new Point(w, h);
+    }
+
+    public BufferedImage getBackground() {
+        Point p = getFutureSize();
+        int w = p.x;
+        int h = p.y;
+        if (w <= 0 || h <= 0) {
+            return null;
+        }
+        BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bi.createGraphics();
+        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+        g2d.setColor(bgColor);
+        g2d.fillRect(0, 0, w, h);
+        if (cachedPolygon == null) {
+            int level = (h * percentageOfWater) / 100;
+            int waveHeight = 10;
+            int waveLength = 20;
+            if (level > waveHeight / 2 + 1) {
+                NatCubic line = new NatCubic();
+                int x = 0;
+                while (x < w + 2 * waveLength) {
+                    line.addPoint(x, h - level - waveHeight / 2 - sea.nextInt(waveHeight));
+                    x = x + waveLength;
+                }
+                cachedPolygon = line.calcualteResult();
+                cachedPolygon.addPoint(w, h);
+                cachedPolygon.addPoint(0, h);
+            }
+        }
+        g2d.setColor(waterColor);
+        if (cachedPolygon != null) {
+            g2d.fillPolygon(cachedPolygon);
+        }
+        //line.paint(g2d);
+        //FlodFill.floodFill(bi, waterColor, new Point(1, h - 1));
+        return bi;
+    }
+
+    public Polygon getCachedPolygon() {
+        return cachedPolygon;
+    }
+
+    public void setCachedPolygon(Polygon cachedPolygon) {
+        this.cachedPolygon = cachedPolygon;
+    }
+
+    @Override
+    public void cutTo(Graphics2D g2, int x, int y) {
+        if (this.getImg() == null) {
+            this.setImg(getBackground());
+        }
+        if (this.getImg() == null) {
+            return;
+        }
+        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+        g2.setFont(getFont());
+        g2.setColor(getTextOutline());
+        g2.drawString(getText(), x, y - 2);
+        g2.drawString(getText(), x, y + 2);
+        g2.drawString(getText(), x - 2, y);
+        g2.drawString(getText(), x + 2, y);
+        //sorry, cuted text have disturbed borders
+        super.cutTo(g2, x, y);
+    }
+
+    /**
+     * @return the waterColor
+     */
+    public Color getWaterColor() {
+        return waterColor;
+    }
+
+    /**
+     * @param waterColor the waterColor to set
+     */
+    public void setWaterColor(Color waterColor) {
+        this.waterColor = waterColor;
+    }
+
+    /**
+     * @return the bgColor
+     */
+    public Color getBgColor() {
+        return bgColor;
+    }
+
+    /**
+     * @param bgColor the bgColor to set
+     */
+    public void setBgColor(Color bgColor) {
+        this.bgColor = bgColor;
+    }
+
+    /**
+     * @return the percentageOfWater
+     */
+    public int getPercentageOfWater() {
+        return percentageOfWater;
+    }
+
+    /**
+     * @param percentageOfWater the percentageOfWater to set
+     */
+    public void setPercentageOfWater(int percentageOfWater) {
+        this.percentageOfWater = percentageOfWater;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreen.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreen.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,85 @@
+/* BasicComponentSplashScreen.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import net.sourceforge.jnlp.splashscreen.SplashErrorPanel;
+
+public abstract class BasicComponentErrorSplashScreen extends BasicComponentSplashScreen implements SplashErrorPanel {
+
+    /**
+     * When applet loading fails, then dying stacktrace can be stted, and is then shown to user on demand.
+     */
+    private Throwable loadingException;
+   
+
+    /**
+     * @return the loadingException
+     */
+    @Override
+    public Throwable getLoadingException() {
+        return loadingException;
+    }
+
+    /**
+     * @param loadingException the loadingException to set
+     */
+    @Override
+    public void setLoadingException(Throwable loadingException) {
+        this.loadingException = loadingException;
+    }
+
+   
+
+    protected void raiseExceptionDialogNOW() {
+        JEditorPaneBasedExceptionDialog dialog = new JEditorPaneBasedExceptionDialog(null, true, getLoadingException(), getInformationContent(), createAditionalInfo());
+        dialog.setVisible(true);
+    }
+
+    protected void raiseExceptionDialogQUEUED() {
+        java.awt.EventQueue.invokeLater(new Runnable() {
+
+            @Override
+            public void run() {
+                raiseExceptionDialogNOW();
+            }
+        });
+    }
+
+    protected void raiseExceptionDialog() {
+        raiseExceptionDialogQUEUED();
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreen.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreen.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,156 @@
+/* BasicComponentSplashScreen.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import javax.swing.JComponent;
+import net.sourceforge.jnlp.splashscreen.SplashPanel;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+
+public abstract class BasicComponentSplashScreen extends JComponent implements SplashPanel {
+    //scaling 100%
+    public static final double ORIGINAL_W = 635;
+    public static final double ORIGINAL_H = 480;
+       /** Width of the plugin window */
+    protected int pluginWidth;
+    /** Height of the plugin window */
+    protected int pluginHeight;
+    /** The project name to display */
+    private SplashReason splashReason;
+    private boolean animationRunning = false;
+    private InformationElement content;
+    private String version;
+
+    @Override
+    public JComponent getSplashComponent() {
+        return this;
+    }
+
+    @Override
+    public boolean isAnimationRunning() {
+        return animationRunning;
+    }
+
+    public void setAnimationRunning(boolean b){
+        animationRunning=b;
+    }
+
+    @Override
+    public void setInformationElement(InformationElement content) {
+        this.content = content;
+    }
+
+    @Override
+    public InformationElement getInformationContent() {
+        return content;
+    }
+
+   
+    /**
+     * @return the pluginWidth
+     */
+    @Override
+    public int getPluginWidth() {
+        return pluginWidth;
+    }
+
+    /**
+     * @param pluginWidth the pluginWidth to set
+     */
+    @Override
+    public void setPluginWidth(int pluginWidth) {
+        this.pluginWidth = pluginWidth;
+    }
+
+    /**
+     * @return the pluginHeight
+     */
+    @Override
+    public int getPluginHeight() {
+        return pluginHeight;
+    }
+
+    /**
+     * @param pluginHeight the pluginHeight to set
+     */
+    @Override
+    public void setPluginHeight(int pluginHeight) {
+        this.pluginHeight = pluginHeight;
+    }
+
+    /**
+     * @return the splashReason
+     */
+    @Override
+    public SplashReason getSplashReason() {
+        return splashReason;
+    }
+
+    /**
+     * @param splashReason the splashReason to set
+     */
+    @Override
+    public void setSplashReason(SplashReason splashReason) {
+        this.splashReason = splashReason;
+    }
+
+    /**
+     * @return the version
+     */
+    @Override
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * @param version the version to set
+     */
+    @Override
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+   
+    protected String createAditionalInfo() {
+        if (getVersion() != null) {
+            return getSplashReason().toString() + " version: " + getVersion();
+        } else {
+            return null;
+        }
+    }
+
+   
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItem.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItem.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,132 @@
+/* DescriptionInfoItem.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+/**
+ *description element: A short statement about the application. Description 
+ * elements are optional. The kind attribute defines how the description should
+ * be used. It can have one of the following values:
+ *
+ *   * one-line: If a reference to the application is going to appear on one row
+ *     in a list or a table, this description will be used.
+ *   * short: If a reference to the application is going to be displayed in a
+ *     situation where there is room for a paragraph, this description is used.
+ *   * tooltip: If a reference to the application is going to appear in a
+ *     tooltip, this description is used.
+ *
+ * Only one description element of each kind can be specified. A description
+ *  element without a kind is used as a default value. Thus, if Java Web Start
+ *  needs a description of kind short, and it is not specified in the JNLP file,
+ *  then the text from the description without an attribute is used.
+ *
+ * All descriptions contain plain text. No formatting, such as with HTML tags,
+ *  is supported.
+ */
+public class DescriptionInfoItem extends InfoItem {
+
+    String kind;
+
+    public DescriptionInfoItem(String value, String kind) {
+        super(InfoItem.description, value);
+        this.kind = kind;
+    }
+
+    public String getKind() {
+        return kind;
+    }
+
+    public void setKind(String kind) {
+        this.kind = kind;
+    }
+
+    public boolean isOfSameKind(DescriptionInfoItem o) {
+        if (o.getKind() == null && getKind() == null) {
+            return true;
+        }
+        if (o.getKind() == null && getKind() != null) {
+            return false;
+        }
+        if (o.getKind() != null && getKind() == null) {
+            return false;
+        }
+        return (o.getKind().equals(getKind()));
+    }
+
+    public boolean isSame(DescriptionInfoItem o) {
+        return isOfSameKind(o) && isofSameType(o);
+
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof DescriptionInfoItem)) {
+            return false;
+        }
+        DescriptionInfoItem o = (DescriptionInfoItem) obj;
+        return super.equals(o) && isOfSameKind(o);
+
+
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 7;
+        hash = 59 * hash + (this.kind != null ? this.kind.hashCode() : 0);
+        hash = 59 * hash + (this.getType() != null ? this.getType().hashCode() : 0);
+        hash = 59 * hash + (this.getValue() != null ? this.getValue().hashCode() : 0);
+        return hash;
+    }
+
+    @Override
+    public String toString() {
+        return super.toString() + " (" + getKind() + ")";
+    }
+
+    @Override
+    public String toXml() {
+        if (kind==null){
+            return super.toXml();
+        }
+        return "<"+type+" kind=\""+kind+"\">"+value+"</"+type+">";
+    }
+
+    @Override
+    public String toNiceString() {
+        return super.toNiceString();
+    }
+
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/InfoItem.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/InfoItem.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,145 @@
+/* InfoItem.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import net.sourceforge.jnlp.InformationDesc;
+import net.sourceforge.jnlp.runtime.Translator;
+
+/**
+ *The optional kind="splash" attribute may be used in an icon element to indicate that the image is to be used as a "splash" screen during the launch of an application. If the JNLP file does not contain an icon element with kind="splash" attribute, Java Web Start will construct a splash screen using other items from the information Element.
+ *If the JNLP file does not contain any icon images, the splash image will consist of the application's title and vendor, as taken from the JNLP file.
+ *
+ * items not used inside
+ */
+public class InfoItem {
+
+    public static final String SPLASH = "SPLASH";
+    public static final String title = "title";
+    public static final String vendor = "vendor";
+    public static final String homepage = "homepage";
+    public static final String homepageHref = "href";
+    public static final String description = "description";
+    public static final String descriptionKind = "kind";
+    public static final String descriptionKindOneLine = (String) InformationDesc.ONE_LINE;
+    //when no kind is specified, then it should behave as short
+    public static final String descriptionKindShort = (String) InformationDesc.SHORT;
+    public static final String descriptionKindToolTip = (String) InformationDesc.TOOLTIP;
+    protected String type;
+    protected String value;
+
+
+    public InfoItem(String type, String value) {
+        this.type = type;
+        this.value = value;
+    }
+
+    /**
+     * @return the type
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * @param type the type to set
+     */
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    /**
+     * @return the value
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * @param value the value to set
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public boolean isofSameType(InfoItem o) {
+        return ((getType().equals(o.getType())));
+
+
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof InfoItem)) {
+            return false;
+        }
+        InfoItem o = (InfoItem) obj;
+        return isofSameType(o) && (getValue().equals(o.getValue()));
+
+
+
+    }
+
+    @Override
+    public String toString() {
+        return type + ": " + value;
+    }
+
+
+    public String toXml() {
+        if (type.equals(homepage)){
+        return "<"+type+" "+homepageHref+"=\""+value+"\"/>";
+        }
+        return "<"+type+">"+value+"</"+type+">";
+    }
+
+    public String toNiceString() {
+        String key = SPLASH + type;
+        return localise(key, value);
+    }
+
+    public static String localise(String key, String s) {
+        return Translator.R(key) + ": " + s;
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 7;
+        hash = 59 * hash + (this.getType() != null ? this.getType().hashCode() : 0);
+        hash = 59 * hash + (this.getValue() != null ? this.getValue().hashCode() : 0);
+        return hash;
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/InformationElement.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/InformationElement.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,215 @@
+/* InformationElement.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+/**
+http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html
+ */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import net.sourceforge.jnlp.InformationDesc;
+import net.sourceforge.jnlp.JNLPFile;
+
+/**
+ *
+ */
+public class InformationElement {
+
+    private InfoItem title;
+    private InfoItem vendor;
+    private InfoItem homepage;
+    private List<DescriptionInfoItem> descriptions = new ArrayList<DescriptionInfoItem>(5);
+
+    public void setTitle(String title) {
+        if (title == null) {
+            return;
+        }
+        this.title = new InfoItem(InfoItem.title, title);
+    }
+
+    public void setvendor(String vendor) {
+        if (vendor == null) {
+            return;
+        }
+        this.vendor = new InfoItem(InfoItem.vendor, vendor);
+    }
+
+    public void setHomepage(String homepage) {
+        if (homepage == null) {
+            return;
+        }
+        this.homepage = new InfoItem(InfoItem.homepage, homepage);
+    }
+
+    public void addDescription(String description) {
+        addDescription(description, null);
+    }
+
+    /**
+     * Just one description of each kind (4 including null)  are  allowed in information element.
+     * This method should throw exception when trying to add second description of same kind
+     * But I do not consider it as good idea to force this behaviour for somesing like psalsh screen,
+     * so I jsut replace the previous one with new one. without any warning
+     */
+    public void addDescription(String description, String kind) {
+        if (description == null) {
+            return;
+        }
+        DescriptionInfoItem d = new DescriptionInfoItem(description, kind);
+        for (DescriptionInfoItem descriptionInfoItem : descriptions) {
+            if (descriptionInfoItem.isOfSameKind(d)) {
+                descriptions.remove(descriptionInfoItem);
+                descriptions.add(d);
+                return;
+            }
+        }
+        descriptions.add(d);
+
+    }
+
+    public InfoItem getBestMatchingDescriptionForSplash() {
+        for (DescriptionInfoItem d : descriptions) {
+            if (InfoItem.descriptionKindOneLine.equals(d.getKind())) {
+                return d;
+            }
+        }
+        for (DescriptionInfoItem d : descriptions) {
+            if (d.getKind() == null) {
+                return d;
+            }
+        }
+        return null;
+    }
+
+    public InfoItem getLongestDescriptionForSplash() {
+        for (DescriptionInfoItem d : descriptions) {
+            if (InfoItem.descriptionKindShort.equals(d.getKind())) {
+                return d;
+            }
+        }
+        for (DescriptionInfoItem d : descriptions) {
+            if (d.getKind() == null) {
+                return d;
+            }
+        }
+        for (DescriptionInfoItem d : descriptions) {
+            if (InfoItem.descriptionKindOneLine.equals(d.getKind())) {
+                return d;
+            }
+        }
+        for (DescriptionInfoItem d : descriptions) {
+            if (InfoItem.descriptionKindToolTip.equals(d.getKind())) {
+                return d;
+            }
+        }
+        return null;
+    }
+
+    public String getTitle() {
+        if (title == null) {
+            return null;
+        }
+        return title.toNiceString();
+    }
+
+    public String getVendor() {
+        if (vendor == null) {
+            return null;
+        }
+        return vendor.toNiceString();
+    }
+
+    public String getHomepage() {
+        if (homepage == null) {
+            return null;
+        }
+        return homepage.toNiceString();
+    }
+
+    List<DescriptionInfoItem> getDescriptions() {
+        return Collections.unmodifiableList(descriptions);
+    }
+
+
+
+    public String getDescription() {
+        InfoItem i = getBestMatchingDescriptionForSplash();
+        if (i == null) {
+            return null;
+        }
+        return i.toNiceString();
+    }
+
+    public List<String> getHeader() {
+        List<String> r = new ArrayList<String>(4);
+        String t = getTitle();
+        String v = getVendor();
+        String h = getHomepage();
+        if (t != null) {
+            r.add(t);
+        }
+        if (v != null) {
+            r.add(v);
+        }
+        if (h != null) {
+            r.add(h);
+        }
+
+        return r;
+    }
+
+    public static InformationElement createFromJNLP(JNLPFile file) {
+        if (file == null) {
+            return null;
+        }
+        try {
+            InformationElement ie = new InformationElement();
+            ie.setHomepage(file.getInformation().getHomepage().toString());
+            ie.setTitle(file.getInformation().getTitle());
+            ie.setvendor(file.getInformation().getVendor());
+            ie.addDescription(file.getInformation().getDescriptionStrict((String)(InformationDesc.DEFAULT)));
+            ie.addDescription(file.getInformation().getDescriptionStrict(InfoItem.descriptionKindOneLine), InfoItem.descriptionKindOneLine);
+            ie.addDescription(file.getInformation().getDescriptionStrict(InfoItem.descriptionKindShort), InfoItem.descriptionKindShort);
+            ie.addDescription(file.getInformation().getDescriptionStrict(InfoItem.descriptionKindToolTip), InfoItem.descriptionKindToolTip);
+            return ie;
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return null;
+        }
+    }
+}
diff -r 01544fb82384 netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,355 @@
+/* JeditorPaneBasedExceptionDialog.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.awt.Toolkit;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.StringSelection;
+import java.awt.event.WindowEvent;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.List;
+import javax.swing.BorderFactory;
+import javax.swing.GroupLayout;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JEditorPane;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.LayoutStyle;
+import javax.swing.SwingConstants;
+import javax.swing.WindowConstants;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
+import net.sourceforge.jnlp.runtime.Translator;
+
+public class JEditorPaneBasedExceptionDialog extends JDialog implements HyperlinkListener {
+
+    // components
+    private JButton closeButton;
+    private JButton closeAndCopyButton;
+    private JButton homeButton;
+    private JEditorPane htmlErrorAndHelpPanel;
+    private JLabel exceptionLabel;
+    private JLabel iconLabel;
+    private JPanel mainPanel;
+    private JPanel topPanel;
+    private JPanel bottomPanel;
+    private JScrollPane htmlPaneScroller;
+    // End of components declaration
+    private final String message;
+    private final Throwable exception;
+
+    /** Creates new form JEditorPaneBasedExceptionDialog */
+    public JEditorPaneBasedExceptionDialog(java.awt.Frame parent, boolean modal, Throwable ex, InformationElement information, String anotherInfo) {
+        super(parent, modal);
+        initComponents();
+        htmlErrorAndHelpPanel.setContentType("text/html");
+        htmlErrorAndHelpPanel.setEditable(false);
+        List<String> l = infoElementToList(information);
+        this.message = getText(ex, l, anotherInfo);
+        this.exception = ex;
+        if (exception == null) {
+            closeAndCopyButton.setVisible(false);
+        }
+        htmlErrorAndHelpPanel.setText(message);
+        //htmlPaneScroller.getVerticalScrollBar().setValue(1);
+        htmlErrorAndHelpPanel.setCaretPosition(0);
+        try {
+            Icon icon = new ImageIcon(this.getClass().getResource("/net/sourceforge/jnlp/resources/warning.png"));
+            iconLabel.setIcon(icon);
+        } catch (Exception lex) {
+            lex.printStackTrace();
+        }
+        htmlErrorAndHelpPanel.addHyperlinkListener(this);
+        homeButton.setVisible(false);
+        this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+
+
+    }
+
+    static List<String> infoElementToList(InformationElement information) {
+        List<String> l = null;
+        if (information != null) {
+            l = information.getHeader();
+            InfoItem ii = information.getLongestDescriptionForSplash();
+            if (ii != null) {
+                l.add(ii.toNiceString());
+            }
+        }
+        return l;
+    }
+
+    private void initComponents() {
+
+        topPanel = new JPanel();
+        closeButton = new JButton();
+        closeAndCopyButton = new JButton();
+        mainPanel = new JPanel();
+        exceptionLabel = new JLabel();
+        iconLabel = new JLabel();
+        bottomPanel = new JPanel();
+        htmlPaneScroller = new JScrollPane();
+        htmlErrorAndHelpPanel = new JEditorPane();
+        homeButton = new JButton();
+
+        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+
+        closeButton.setText(Translator.R(InfoItem.SPLASH + "Close"));
+        closeButton.addActionListener(new java.awt.event.ActionListener() {
+
+            @Override
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                closeWindowButtonActionPerformed(evt);
+            }
+        });
+
+        closeAndCopyButton.setText(Translator.R(InfoItem.SPLASH + "closewAndCopyException"));
+        closeAndCopyButton.addActionListener(new java.awt.event.ActionListener() {
+
+            @Override
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                copyAndCloseButtonActionPerformed(evt);
+            }
+        });
+
+        GroupLayout jPanel2Layout = new GroupLayout(topPanel);
+        topPanel.setLayout(jPanel2Layout);
+        jPanel2Layout.setHorizontalGroup(
+                jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addComponent(closeButton).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 314, Short.MAX_VALUE).addComponent(closeAndCopyButton).addContainerGap()));
+        jPanel2Layout.setVerticalGroup(
+                jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup().addContainerGap(24, Short.MAX_VALUE).addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(closeButton).addComponent(closeAndCopyButton)).addContainerGap()));
+
+        exceptionLabel.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
+        exceptionLabel.setHorizontalAlignment(SwingConstants.CENTER);
+        exceptionLabel.setText(Translator.R(InfoItem.SPLASH + "exOccured"));
+
+        bottomPanel.setBorder(BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
+        bottomPanel.setLayout(new java.awt.BorderLayout());
+
+        htmlPaneScroller.setViewportView(htmlErrorAndHelpPanel);
+
+        bottomPanel.add(htmlPaneScroller, java.awt.BorderLayout.CENTER);
+
+        homeButton.setText(Translator.R(InfoItem.SPLASH + "Home"));
+        homeButton.addActionListener(new java.awt.event.ActionListener() {
+
+            @Override
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                homeButtonActionPerformed(evt);
+            }
+        });
+
+        GroupLayout jPanel1Layout = new GroupLayout(mainPanel);
+        mainPanel.setLayout(jPanel1Layout);
+        jPanel1Layout.setHorizontalGroup(
+                jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(iconLabel, GroupLayout.PREFERRED_SIZE, 71, GroupLayout.PREFERRED_SIZE).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(exceptionLabel, GroupLayout.DEFAULT_SIZE, 503, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(homeButton, GroupLayout.PREFERRED_SIZE, 101, GroupLayout.PREFERRED_SIZE).addContainerGap()).addComponent(bottomPanel, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 723, Short.MAX_VALUE));
+        jPanel1Layout.setVerticalGroup(
+                jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(iconLabel, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE).addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(exceptionLabel, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE).addComponent(homeButton, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE))).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(bottomPanel, GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)));
+
+        GroupLayout layout = new GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+                layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(mainPanel, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(topPanel, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addContainerGap()));
+        layout.setVerticalGroup(
+                layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(mainPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(topPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addContainerGap()));
+
+        pack();
+    }
+
+    private void copyAndCloseButtonActionPerformed(java.awt.event.ActionEvent evt) {
+        if (exception != null) {
+            try {
+                StringSelection data = new StringSelection(getExceptionStackTraceAsString(exception));
+                Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+                clipboard.setContents(data, data);
+            } catch (Exception ex) {
+                JOptionPane.showMessageDialog(this, Translator.R(InfoItem.SPLASH + "cantCopyEx"));
+                ex.printStackTrace();
+            }
+        } else {
+            JOptionPane.showMessageDialog(this, Translator.R(InfoItem.SPLASH + "noExRecorded"));
+        }
+        close();
+    }
+
+    private void homeButtonActionPerformed(java.awt.event.ActionEvent evt) {
+        htmlErrorAndHelpPanel.setText(message);
+        homeButton.setVisible(false);
+    }
+
+    private void closeWindowButtonActionPerformed(java.awt.event.ActionEvent evt) {
+        close();
+    }
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[]) {
+        java.awt.EventQueue.invokeLater(new Runnable() {
+
+            public void run() {
+                Exception ex = new RuntimeException("dsgsfdg");
+                JEditorPaneBasedExceptionDialog dialog = new JEditorPaneBasedExceptionDialog(new JFrame(), true, ex, null, "uaaa: aaa\nwqdeweq:sdsds");
+                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
+
+                    public void windowClosing(java.awt.event.WindowEvent e) {
+                        System.exit(0);
+                    }
+                });
+                dialog.setVisible(true);
+            }
+        });
+    }
+
+    static String getText(Throwable ex, List<String> l, String anotherInfo) {
+        StringBuilder s = new StringBuilder("<html><body>");
+        String info = "<p>"
+                + Translator.R(InfoItem.SPLASH + "mainL1") + " "
+                + " <a href=\""
+                + Translator.R(InfoItem.SPLASH + "url")
+                + "\">"
+                + Translator.R(InfoItem.SPLASH + "urlLooks") + "</a> "
+                + Translator.R(InfoItem.SPLASH + "mainL2")
+                + " </p> \n";
+        String t = "<p>"
+                + Translator.R(InfoItem.SPLASH + "mainL3")
+                + "</p> \n"
+                + info + formatListInfoList(l) + formatInfo(anotherInfo);
+        Object[] options = new String[2];
+        options[0] = Translator.R(InfoItem.SPLASH + "Close");
+        options[1] = Translator.R(InfoItem.SPLASH + "closeAndCopyShorter");
+        if (ex != null) {
+            t = "<p>"
+                    + Translator.R(InfoItem.SPLASH + "mainL4")
+                    + " </p>\n"
+                    + info + formatListInfoList(l) + formatInfo(anotherInfo)
+                    + "<p>"
+                    + Translator.R(InfoItem.SPLASH + "exWas")
+                    + " <br/>\n" + "<pre>" + getExceptionStackTraceAsString(ex) + "</pre>";
+
+
+        } else {
+            t += formatListInfoList(l);
+        }
+        s.append(t);
+        s.append("</body></html>");
+        return s.toString();
+    }
+
+    public static String getExceptionStackTraceAsString(Throwable exception) {
+        if (exception == null) {
+            return "";
+        }
+        StringWriter sw = new StringWriter();
+        exception.printStackTrace(new PrintWriter(sw));
+        return sw.toString();
+    }
+
+    public static String[] getExceptionStackTraceAsStrings(Throwable exception) {
+        if (exception == null) {
+            return new String[0];
+        }
+        StringWriter sw = new StringWriter();
+        exception.printStackTrace(new PrintWriter(sw));
+        return sw.toString().split("\n");
+    }
+
+    @Override
+    public void hyperlinkUpdate(HyperlinkEvent event) {
+        if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
+            try {
+                htmlErrorAndHelpPanel.setPage(event.getURL());
+                homeButton.setVisible(true);
+
+            } catch (Exception ioe) {
+                JOptionPane.showMessageDialog(this, Translator.R(InfoItem.SPLASH + "cfl") + " "
+                        + event.getURL().toExternalForm() + ": " + ioe);
+            }
+        }
+    }
+
+    private void close() {
+        processWindowEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));
+    }
+
+    static String formatListInfoList(List<String> l) {
+        if (l == null) {
+            return "";
+        }
+        StringBuilder sb = new StringBuilder();
+        sb.append("<p>");
+        sb.append("<h3>").
+                append(Translator.R(InfoItem.SPLASH + "vendorsInfo")).append(":</h3>");
+        sb.append("<pre>");
+        for (int i = 0; i < l.size(); i++) {
+            String string = l.get(i);
+            sb.append(string).append("\n");
+        }
+        sb.append("</pre>");
+        sb.append("</p>");
+        return sb.toString();
+    }
+
+    static String formatInfo(String l) {
+        if (l == null) {
+            return "";
+        }
+        StringBuilder sb = new StringBuilder();
+        sb.append("<p>");
+        sb.append("<h3>").
+                append(Translator.R(InfoItem.SPLASH + "anotherInfo")).append(": </h3>");
+        sb.append("<pre>");
+        sb.append(l);
+        sb.append("</pre>");
+        sb.append("</p>");
+        return sb.toString();
+    }
+
+    Throwable getException() {
+        return exception;
+    }
+
+    String getMessage() {
+        return message;
+    }
+}
-------------- next part --------------
diff -r 01544fb82384 Makefile.am
--- a/Makefile.am	Wed Jul 11 16:18:58 2012 +0200
+++ b/Makefile.am	Wed Aug 01 13:25:15 2012 +0200
@@ -174,6 +174,7 @@
 edit_launcher_script = sed \
   -e 's|[@]LAUNCHER_BOOTCLASSPATH[@]|$(LAUNCHER_BOOTCLASSPATH)|g' \
   -e 's|[@]JAVAWS_BIN_LOCATION[@]|$(bindir)/$(javaws)|g' \
+  -e 's|[@]JAVAWS_SPLASH_LOCATION[@]|$(datadir)/$(PACKAGE_NAME)/javaws_splash.png|g' \
   -e 's|[@]ITWEB_SETTINGS_BIN_LOCATION[@]|$(bindir)/$(itweb_settings)|g' \
   -e 's|[@]JAVA[@]|$(JAVA)|g' \
   -e 's|[@]JRE[@]|$(SYSTEM_JRE_DIR)|g'
@@ -204,6 +205,7 @@
 	${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
 endif
 	${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar
+	${INSTALL_DATA} $(NETX_SRCDIR)/javaws_splash.png $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/javaws_splash.png
 	${INSTALL_PROGRAM} launcher.build/$(javaws) $(DESTDIR)$(bindir)
 	${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar
 	${INSTALL_PROGRAM} launcher.build/$(itweb_settings) $(DESTDIR)$(bindir)
diff -r 01544fb82384 NEWS
--- a/NEWS	Wed Jul 11 16:18:58 2012 +0200
+++ b/NEWS	Wed Aug 01 13:25:15 2012 +0200
@@ -9,6 +9,7 @@
 CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
 
 New in release 1.3 (2012-XX-XX):
+* Splash screen for javaws and plugin
 * NetX
   - PR898: signed applications with big jnlp-file doesn't start (webstart affect like "frozen")
   - PR811: javaws is not handling urls with spaces (and other characters needing encoding) correctly
diff -r 01544fb82384 launcher/javaws.in
--- a/launcher/javaws.in	Wed Jul 11 16:18:58 2012 +0200
+++ b/launcher/javaws.in	Wed Aug 01 13:25:15 2012 +0200
@@ -5,6 +5,7 @@
 LAUNCHER_FLAGS=-Xms8m
 CLASSNAME=net.sourceforge.jnlp.runtime.Boot
 BINARY_LOCATION=@JAVAWS_BIN_LOCATION@
+SPLASH_LOCATION=@JAVAWS_SPLASH_LOCATION@
 PROGRAM_NAME=javaws
 CP=@JRE@/lib/rt.jar
 
@@ -15,6 +16,10 @@
 i=0
 j=0
 
+SPLASH="false"
+if [ "x$ICEDTEA_WEB_SPLASH" = "x" ] ; then
+SPLASH="true"
+fi;
 while [ "$#" -gt "0" ]; do
   case "$1" in
     -J*)
@@ -24,6 +29,9 @@
     *)
       ARGS[$j]="$1"
       j=$((j+1))
+      if [ "$1" = "-headless" ] ; then
+        SPLASH="false"
+      fi
       ;;
   esac
   shift
@@ -32,6 +40,10 @@
 k=0
 COMMAND[k]="${JAVA}"
 k=$((k+1))
+if [ "$SPLASH" = "true" ] ; then
+COMMAND[k]="-splash:${SPLASH_LOCATION}"
+k=$((k+1))
+fi;
 COMMAND[k]="${LAUNCHER_BOOTCLASSPATH}"
 k=$((k+1))
 COMMAND[k]="${LAUNCHER_FLAGS}"
diff -r 01544fb82384 netx/javaws_splash.png
Binary file netx/javaws_splash.png has changed
diff -r 01544fb82384 netx/net/sourceforge/jnlp/GuiLaunchHandler.java
--- a/netx/net/sourceforge/jnlp/GuiLaunchHandler.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/GuiLaunchHandler.java	Wed Aug 01 13:25:15 2012 +0200
@@ -1,5 +1,5 @@
 /* GuiLaunchHandler.java
-   Copyright (C) 2011 Red Hat, Inc.
+   Copyright (C) 2012 Red Hat, Inc.
 
 This file is part of IcedTea.
 
@@ -54,7 +54,7 @@
  */
 public class GuiLaunchHandler extends AbstractLaunchHandler {
 
-    private JNLPSplashScreen splashScreen = null;
+    private volatile JNLPSplashScreen splashScreen = null;
     private final Object mutex = new Object();
     private UpdatePolicy policy = UpdatePolicy.ALWAYS;
 
@@ -80,10 +80,13 @@
     }
 
     private void closeSplashScreen() {
-        synchronized(mutex) {
+        synchronized (mutex) {
             if (splashScreen != null) {
                 if (splashScreen.isSplashScreenValid()) {
                     splashScreen.setVisible(false);
+                    if (splashScreen.isCustomSplashscreen()) {
+                        splashScreen.stopAnimation();
+                    }
                 }
                 splashScreen.dispose();
             }
@@ -102,40 +105,56 @@
 
     @Override
     public void launchInitialized(final JNLPFile file) {
-        
+
         int preferredWidth = 500;
         int preferredHeight = 400;
 
         final URL splashImageURL = file.getInformation().getIconLocation(
                 IconDesc.SPLASH, preferredWidth, preferredHeight);
 
+        final ResourceTracker resourceTracker = new ResourceTracker(true);
         if (splashImageURL != null) {
-            final ResourceTracker resourceTracker = new ResourceTracker(true);
             resourceTracker.addResource(splashImageURL, file.getFileVersion(), null, policy);
-            synchronized(mutex) {
-                try {
-                    SwingUtilities.invokeAndWait(new Runnable() {
-                        @Override
-                        public void run() {
-                            splashScreen = new JNLPSplashScreen(resourceTracker, null, null);
-                        }
-                    });
-                } catch (InterruptedException ie) {
-                    // Wait till splash screen is created
-                    while (splashScreen == null);
-                } catch (InvocationTargetException ite) {
-                    ite.printStackTrace();
-                }
+        }
+        synchronized (mutex) {
+            try {
+                SwingUtilities.invokeAndWait(new Runnable() {
 
-                splashScreen.setSplashImageURL(splashImageURL);
+                    @Override
+                    public void run() {
+                        splashScreen = new JNLPSplashScreen(resourceTracker, file);
+                    }
+                });
+            } catch (InterruptedException ie) {
+                // Wait till splash screen is created
+                while (splashScreen == null);
+            } catch (InvocationTargetException ite) {
+                ite.printStackTrace();
             }
+            try {
+                SwingUtilities.invokeAndWait(new Runnable() {
+
+                    @Override
+                    public void run() {
+                        splashScreen.setSplashImageURL(splashImageURL);
+                    }
+                });
+            } catch (InterruptedException ie) {
+                // Wait till splash screen is created
+                while (splashScreen == null);
+            } catch (InvocationTargetException ite) {
+                ite.printStackTrace();
+            }
+
+
         }
-        
+
         SwingUtilities.invokeLater(new Runnable() {
+
             @Override
             public void run() {
-                if (splashImageURL != null) {
-                    synchronized(mutex) {
+                if (splashScreen != null) {
+                    synchronized (mutex) {
                         if (splashScreen.isSplashScreenValid()) {
                             splashScreen.setVisible(true);
                         }
diff -r 01544fb82384 netx/net/sourceforge/jnlp/InformationDesc.java
--- a/netx/net/sourceforge/jnlp/InformationDesc.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/InformationDesc.java	Wed Aug 01 13:25:15 2012 +0200
@@ -34,7 +34,8 @@
     // specification name.
 
     /** one-line description */
-    public static final Object ONE_LINE = "oneline";
+    /**http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html**/
+    public static final Object ONE_LINE = "one-line";
 
     /** short description */
     public static final Object SHORT = "short";
@@ -110,13 +111,24 @@
      * Information.TOOLTIP, Information.DEFAULT
      */
     public String getDescription(Object kind) {
-        String result = (String) getItem("description-" + kind);
+        String result = getDescriptionStrict(kind);
         if (result == null)
             return (String) getItem("description-" + DEFAULT);
         else
             return result;
     }
 
+      /**
+     * Returns the application's description of the specified type.
+     *
+     * @param kind one of Information.SHORT, Information.ONE_LINE,
+     * Information.TOOLTIP, Information.DEFAULT
+     */
+    public String getDescriptionStrict(Object kind) {
+        return (String) getItem("description-" + kind);
+        
+    }
+
     /**
      * Returns the icons specified by the JNLP file.
      *
diff -r 01544fb82384 netx/net/sourceforge/jnlp/JNLPSplashScreen.java
--- a/netx/net/sourceforge/jnlp/JNLPSplashScreen.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/JNLPSplashScreen.java	Wed Aug 01 13:25:15 2012 +0200
@@ -1,5 +1,43 @@
+/* JNLPSplashScreen.java
+   Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
 package net.sourceforge.jnlp;
 
+import java.awt.BorderLayout;
 import java.awt.Dimension;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
@@ -15,19 +53,23 @@
 import net.sourceforge.jnlp.cache.ResourceTracker;
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
 import net.sourceforge.jnlp.util.ImageResources;
+import net.sourceforge.jnlp.splashscreen.SplashPanel;
+import net.sourceforge.jnlp.splashscreen.SplashUtils;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
 
 public class JNLPSplashScreen extends JDialog {
 
-    String applicationTitle;
-    String applicationVendor;
 
     ResourceTracker resourceTracker;
 
     URL splashImageUrl;
     Image splashImage;
+    private final JNLPFile file;
+    public static final  int DEF_WIDTH=635;
+    public static final  int DEF_HEIGHT=480;
+    private SplashPanel componetSplash;
 
-    public JNLPSplashScreen(ResourceTracker resourceTracker,
-            String applicationTitle, String applicationVendor) {
+    public JNLPSplashScreen(ResourceTracker resourceTracker, final JNLPFile file) {
 
         setIconImages(ImageResources.INSTANCE.getApplicationImages());
 
@@ -36,61 +78,82 @@
         // JNLP file.
 
         this.resourceTracker = resourceTracker;
-        this.applicationTitle = applicationTitle;
-        this.applicationVendor = applicationVendor;
+        this.file=file;
 
     }
 
     public void setSplashImageURL(URL url) {
-        splashImageUrl = url;
-        splashImage = null;
-        try {
-            splashImage = ImageIO.read(resourceTracker
-                    .getCacheFile(splashImageUrl));
-            if (splashImage == null) {
+        if (url != null) {
+            splashImageUrl = url;
+            splashImage = null;
+            try {
+                splashImage = ImageIO.read(resourceTracker.getCacheFile(splashImageUrl));
+                if (splashImage == null) {
+                    if (JNLPRuntime.isDebug()) {
+                        System.err.println("Error loading splash image: " + url);
+                    }
+
+                }
+            } catch (IOException e) {
                 if (JNLPRuntime.isDebug()) {
                     System.err.println("Error loading splash image: " + url);
                 }
-                return;
+                splashImage = null;
+
+            } catch (IllegalArgumentException argumentException) {
+                if (JNLPRuntime.isDebug()) {
+                    System.err.println("Error loading splash image: " + url);
+                }
+                splashImage = null;
+
             }
-        } catch (IOException e) {
-            if (JNLPRuntime.isDebug()) {
-                System.err.println("Error loading splash image: " + url);
-            }
-            splashImage = null;
-            return;
-        } catch (IllegalArgumentException argumentException) {
-            if (JNLPRuntime.isDebug()) {
-                System.err.println("Error loading splash image: " + url);
-            }
-            splashImage = null;
-            return;
         }
 
+        if (splashImage == null) {
+            this.setLayout(new BorderLayout());
+            SplashPanel splash = SplashUtils.getSplashScreen(DEF_WIDTH, DEF_HEIGHT);
+            if (splash != null) {
+                splash.startAnimation();
+                splash.setInformationElement(InformationElement.createFromJNLP(file));
+                this.add(splash.getSplashComponent());
+                this.componetSplash = splash;
+            }
+        }
         correctSize();
     }
 
     public boolean isSplashScreenValid() {
-        return (splashImage != null);
+        return (splashImage != null) || (componetSplash != null);
+
     }
 
     private void correctSize() {
+        int minimumWidth = DEF_WIDTH;
+        int minimumHeight = DEF_HEIGHT;
+        if (splashImage != null) {
+            Insets insets = getInsets();
+            minimumWidth = splashImage.getWidth(null) + insets.left
+                    + insets.right;
+            minimumHeight = splashImage.getHeight(null) + insets.top
+                    + insets.bottom;
+        }
+        setMinimumSize(new Dimension(0, 0));
+        setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
+        setSize(new Dimension(minimumWidth, minimumHeight));
+        setPreferredSize(new Dimension(minimumWidth, minimumHeight));
 
-        Insets insets = getInsets();
-        int minimumWidth = splashImage.getWidth(null) + insets.left
-                + insets.right;
-        int minimumHeight = splashImage.getHeight(null) + insets.top
-                + insets.bottom;
-        setMinimumSize(new Dimension(minimumWidth, minimumHeight));
-
-        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-        setLocation((screenSize.width - minimumWidth) / 2,
-                (screenSize.height - minimumHeight) / 2);
+        // Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+        // setLocation((screenSize.width - minimumWidth) / 2,
+        // (screenSize.height - minimumHeight) / 2);
+        //Above works always, but center only to middle of all monitors
+        //below works on 1.4 and higher, and center to middle of primary monmtor
+        setLocationRelativeTo(null);
     }
 
     @Override
     public void paint(Graphics g) {
         if (splashImage == null) {
+            super.paint(g);
             return;
         }
 
@@ -99,4 +162,12 @@
         g2.drawImage(splashImage, getInsets().left, getInsets().top, null);
 
     }
+
+    boolean isCustomSplashscreen() {
+       return (componetSplash!=null);
+    }
+
+    void stopAnimation() {
+        if (isCustomSplashscreen()) componetSplash.stopAnimation();
+    }
 }
diff -r 01544fb82384 netx/net/sourceforge/jnlp/Launcher.java
--- a/netx/net/sourceforge/jnlp/Launcher.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/Launcher.java	Wed Aug 01 13:25:15 2012 +0200
@@ -20,6 +20,7 @@
 
 import java.applet.Applet;
 import java.awt.Container;
+import java.awt.SplashScreen;
 import java.io.File;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
@@ -42,6 +43,8 @@
 
 import javax.swing.SwingUtilities;
 import javax.swing.text.html.parser.ParserDelegator;
+import net.sourceforge.jnlp.runtime.AppletEnvironment;
+import net.sourceforge.jnlp.splashscreen.SplashUtils;
 
 import sun.awt.SunToolkit;
 
@@ -540,6 +543,12 @@
             }
 
             if (JNLPRuntime.getForksAllowed() && file.needsNewVM()) {
+                if (!JNLPRuntime.isHeadless()){
+                    SplashScreen sp = SplashScreen.getSplashScreen();
+                    if (sp!=null) {
+                        sp.close();
+                    }
+                }
                 List<String> netxArguments = new LinkedList<String>();
                 netxArguments.add("-Xnofork");
                 netxArguments.addAll(JNLPRuntime.getInitialArguments());
@@ -649,18 +658,22 @@
      * @param enableCodeBase whether to add the codebase URL to the classloader
      */
     protected ApplicationInstance launchApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException {
-        if (!file.isApplet())
+        if (!file.isApplet()) {
             throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo")));
+        }
 
+        AppletInstance applet = null;
         try {
-            AppletInstance applet = createApplet(file, enableCodeBase, cont);
+            applet = createApplet(file, enableCodeBase, cont);
             applet.initialize();
 
             applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance
             return applet;
         } catch (LaunchException lex) {
+            SplashUtils.showErrorCaught(lex, applet);
             throw launchError(lex);
         } catch (Exception ex) {
+            SplashUtils.showErrorCaught(ex, applet);
             throw launchError(new LaunchException(file, ex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LCouldNotLaunchInfo")));
         }
     }
@@ -669,16 +682,19 @@
      * Gets an ApplicationInstance, but does not launch the applet.
      */
     protected ApplicationInstance getApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException {
-        if (!file.isApplet())
+        if (!file.isApplet()) {
             throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo")));
-
+        }
+        AppletInstance applet = null;
         try {
-            AppletInstance applet = createApplet(file, enableCodeBase, cont);
+            applet = createApplet(file, enableCodeBase, cont);
             applet.initialize();
             return applet;
         } catch (LaunchException lex) {
+            SplashUtils.showErrorCaught(lex, applet);
             throw launchError(lex);
         } catch (Exception ex) {
+            SplashUtils.showErrorCaught(ex, applet);
             throw launchError(new LaunchException(file, ex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LCouldNotLaunchInfo")));
         }
     }
@@ -696,22 +712,30 @@
      *
      * @param enableCodeBase whether to add the code base URL to the classloader
      */
-    protected AppletInstance createApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException {
+    protected  synchronized  AppletInstance createApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException {
+            // appletInstance is needed by ServiceManager when looking up
+            // services. This could potentially be done in applet constructor
+            // so initialize appletInstance before creating applet.
+        AppletInstance appletInstance = null;
+        ThreadGroup group = Thread.currentThread().getThreadGroup();
         try {
             JNLPClassLoader loader = JNLPClassLoader.getInstance(file, updatePolicy);
 
             if (enableCodeBase) {
                 loader.enableCodeBase();
             } else if (file.getResources().getJARs().length == 0) {
-                throw new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later");
+                Exception ex = new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later");
+                try {
+                    SplashUtils.showError(ex, new AppletEnvironment(file, new AppletInstance(file, group, new ClassLoader() {
+                    }, null)));
+                } catch (Exception exx) {
+                    if (JNLPRuntime.isDebug()) {
+                        exx.printStackTrace();
+                    }
+                }
+                throw ex;
             }
 
-            ThreadGroup group = Thread.currentThread().getThreadGroup();
-
-            // appletInstance is needed by ServiceManager when looking up 
-            // services. This could potentially be done in applet constructor
-            // so initialize appletInstance before creating applet.
-            AppletInstance appletInstance;
             if (cont == null)
                 appletInstance = new AppletInstance(file, group, loader, null);
             else
@@ -732,6 +756,7 @@
 
             return appletInstance;
         } catch (Exception ex) {
+            SplashUtils.showErrorCaught(ex, appletInstance);
             throw launchError(new LaunchException(file, ex, R("LSFatal"), R("LCInit"), R("LInitApplet"), R("LInitAppletInfo")));
         }
     }
@@ -842,7 +867,7 @@
         new ParserDelegator();
     }
 
-    /**
+       /**
      * This runnable is used to call the appropriate launch method
      * for the application, applet, or installer in its thread group.
      */
diff -r 01544fb82384 netx/net/sourceforge/jnlp/NetxPanel.java
--- a/netx/net/sourceforge/jnlp/NetxPanel.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/NetxPanel.java	Wed Aug 01 13:25:15 2012 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007 Red Hat, Inc.
+ * Copyright 2012 Red Hat, Inc.
  * This file is part of IcedTea, http://icedtea.classpath.org
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -22,7 +22,6 @@
 
 package net.sourceforge.jnlp;
 
-import net.sourceforge.jnlp.AppletLog;
 import net.sourceforge.jnlp.runtime.AppletInstance;
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
 
@@ -32,6 +31,8 @@
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+import net.sourceforge.jnlp.splashscreen.SplashController;
+import net.sourceforge.jnlp.splashscreen.SplashPanel;
 
 import sun.applet.AppletViewerPanel;
 import sun.awt.SunToolkit;
@@ -42,10 +43,11 @@
  *
  * @author      Francis Kung <fkung at redhat.com>
  */
-public class NetxPanel extends AppletViewerPanel {
+public class NetxPanel extends AppletViewerPanel implements SplashController {
     private PluginBridge bridge = null;
     private boolean exitOnFailure = true;
     private AppletInstance appInst = null;
+    private SplashController appletViewerFrame;
     private boolean appletAlive;
     private final String uKey;
 
@@ -232,4 +234,32 @@
             SunToolkit.createNewAppContext();
         }
     }
+
+    
+   
+
+    public void setAppletViewerFrame(SplashController framePanel) {
+        appletViewerFrame=framePanel;
+    }
+
+    @Override
+    public void removeSplash() {
+        appletViewerFrame.removeSplash();
+    }
+
+    @Override
+    public void replaceSplash(SplashPanel r) {
+        appletViewerFrame.replaceSplash(r);
+    }
+
+    @Override
+    public int getSplashWidth() {
+        return appletViewerFrame.getSplashWidth();
+    }
+
+    @Override
+    public int getSplashHeigth() {
+        return appletViewerFrame.getSplashHeigth();
+    }
+
 }
diff -r 01544fb82384 netx/net/sourceforge/jnlp/resources/Messages.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties	Wed Aug 01 13:25:15 2012 +0200
@@ -438,3 +438,28 @@
 CLInfoDescription=Shows more information about the given property
 CLCheckDescription=Shows any properties that have been defined but are not recognized by IcedTea Web
 CLHelpDescription=The itweb-settings tool allows a user to modify, view and check configuration. \nTo use the GUI, do not pass any arguments. To use the CLI mode, pass in the approrpiate command and parameters. For help with a particular command, try: {0} command help
+
+#  splash screen related
+SPLASHerror = Click here for details. Serious exception occcured.
+SPLASH_ERROR = ERROR
+SPLASHtitle = Title
+SPLASHvendor = Vendor
+SPLASHhomepage = Homepage
+SPLASHdescription = Description
+SPLASHClose= Close
+SPLASHclosewAndCopyException = Close and copy StackTrace to clipboard
+SPLASHexOccured = Sorry, an serious exception have occured...
+SPLASHHome = Home
+SPLASHcantCopyEx = Can not copy exception
+SPLASHnoExRecorded = No exception recorded
+SPLASHmainL1 = For even more  inforamtion you can visit
+SPLASHurl = http://icedtea.classpath.org/wiki/IcedTea-Web#Filing_bugs
+SPLASHurlLooks = http://icedtea.classpath.org/wiki/IcedTea-Web
+SPLASHmainL2 = and follow the steps to obtain information and fill bug
+SPLASHmainL3 = Sorry no more informations avaiable, try to launch browser from commandline and watch output.
+SPLASHcloseAndCopyShorter = Close and copy to clipboard
+SPLASHmainL4 = We have noticed exception written below, for even more information try to launch browser from commandline and watch output
+SPLASHexWas = Exception was:
+SPLASHcfl = Can't follow link to
+SPLASHvendorsInfo = Information from vendor of your application
+SPLASHanotherInfo = Another avaiable info
\ No newline at end of file
diff -r 01544fb82384 netx/net/sourceforge/jnlp/runtime/Boot.java
--- a/netx/net/sourceforge/jnlp/runtime/Boot.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/Boot.java	Wed Aug 01 13:25:15 2012 +0200
@@ -53,8 +53,8 @@
     // todo: decide whether a spawned netx (external launch)
     // should inherit the same options as this instance (store argv?)
 
-    private static final String name = Boot.class.getPackage().getImplementationTitle();
-    private static final String version = Boot.class.getPackage().getImplementationVersion();
+    public static final String name = Boot.class.getPackage().getImplementationTitle();
+    public static final String version = Boot.class.getPackage().getImplementationVersion();
 
     /** the text to display before launching the about link */
     private static final String aboutMessage = ""
diff -r 01544fb82384 plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
--- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Wed Aug 01 13:25:15 2012 +0200
@@ -76,6 +76,7 @@
 import java.awt.event.WindowListener;
 import java.awt.print.PageFormat;
 import java.awt.print.Printable;
+import java.awt.Component;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintStream;
@@ -93,10 +94,8 @@
 import java.security.PrivilegedExceptionAction;
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Vector;
 
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
@@ -115,6 +114,11 @@
 import sun.misc.Ref;
 
 import com.sun.jndi.toolkit.url.UrlUtil;
+import java.util.Hashtable;
+import java.util.Vector;
+import net.sourceforge.jnlp.splashscreen.SplashController;
+import net.sourceforge.jnlp.splashscreen.SplashPanel;
+import net.sourceforge.jnlp.splashscreen.SplashUtils;
 
 /**
  * Lets us construct one using unix-style one shot behaviors
@@ -145,7 +149,12 @@
             @Override public void run() {
                 panel.createNewAppContext();
                 // create the frame.
-                PluginAppletViewer.framePanel(identifier, handle, panel);
+                int width = Integer.parseInt(atts.get("width"));
+                int height = Integer.parseInt(atts.get("height"));
+
+                PluginDebug.debug("X and Y are: " + width + " " + height);
+                panel.setAppletViewerFrame(PluginAppletViewer.framePanel(identifier,handle, width, height, panel));
+
                 panel.init();
                 // Start the applet
                 initEventQueue(panel);
@@ -198,6 +207,8 @@
             ie.printStackTrace();
         }
 
+        panel.removeSplash();
+
         AppletSecurityContextManager.getSecurityContext(0).associateSrc(panel.getAppletClassLoader(), doc);
         AppletSecurityContextManager.getSecurityContext(0).associateInstance(identifier, panel.getAppletClassLoader());
 
@@ -271,7 +282,7 @@
 // FIXME: declare JSProxy implementation
 @SuppressWarnings("serial")
 public class PluginAppletViewer extends XEmbeddedFrame
-        implements AppletContext, Printable {
+        implements AppletContext, Printable, SplashController {
 
     /**
      *  Enumerates the current status of an applet
@@ -323,26 +334,32 @@
     private Image bufFrameImg;
     private Graphics bufFrameImgGraphics;
 
+
+    private SplashPanel splashPanel;
+ 
     /**
      * Null constructor to allow instantiation via newInstance()
      */
     public PluginAppletViewer() {
     }
 
-    public static void framePanel(int identifier, long handle, NetxPanel panel) {
+     public static synchronized  PluginAppletViewer framePanel(int identifier,long handle, int width, int height, NetxPanel panel) {
 
         PluginDebug.debug("Framing ", panel);
-
-        // SecurityManager MUST be set, and only privileged code may call reFrame()
+ 
+        // SecurityManager MUST be set, and only privileged code may call framePanel()
         System.getSecurityManager().checkPermission(new AllPermission());
 
         PluginAppletViewer appletFrame = new PluginAppletViewer(handle, identifier, panel);
-
-        appletFrame.add("Center", panel);
-        appletFrame.pack();
-
+        
         appletFrame.appletEventListener = new AppletEventListener(appletFrame, appletFrame);
         panel.addAppletListener(appletFrame.appletEventListener);
+         // Clear bindings, if any
+        if (applets.containsKey(identifier)) {
+            PluginAppletViewer oldFrame = applets.get(identifier);            
+            oldFrame.remove(panel);
+            panel.removeAppletListener(oldFrame.appletEventListener);
+        }
 
         appletsLock.lock();
         applets.put(identifier, appletFrame);
@@ -350,6 +367,7 @@
         appletsLock.unlock();
 
         PluginDebug.debug(panel, " framed");
+               return appletFrame;
     }
 
     /**
@@ -383,9 +401,107 @@
         };
 
         addWindowListener(windowEventListener);
+        final AppletPanel fPanel = panel;
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+
+                public void run() {
+                    add("Center", fPanel);
+                    fPanel.setVisible(false);
+
+                    splashPanel = SplashUtils.getSplashScreen(fPanel.getWidth(), fPanel.getHeight());
+                    if (splashPanel != null) {
+                        splashPanel.startAnimation();
+                        PluginDebug.debug("Added splash " + splashPanel);
+                        add("Center", splashPanel.getSplashComponent());
+                    }
+                    pack();
+                }
+            });
+        } catch (Exception e) {
+            e.printStackTrace(); // Not much we can do other and print
+        }
 
     }
 
+    public void replaceSplash(final SplashPanel newSplash) {
+        // Loading done. Remove splash screen.
+        if (splashPanel == null) {
+            return;
+        }
+        if (newSplash == null) {
+            removeSplash();
+            return;
+        }
+        splashPanel.stopAnimation();
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+
+                public void run() {
+                    splashPanel.getSplashComponent().setVisible(false);
+                    splashPanel.stopAnimation();
+                    remove(splashPanel.getSplashComponent());
+                    newSplash.setPercentage(splashPanel.getPercentage());
+                    newSplash.setPluginWidth(splashPanel.getPluginWidth());
+                    newSplash.setPluginHeight(splashPanel.getPluginHeight());
+                    newSplash.adjustForSize();
+                    splashPanel = newSplash;
+                    add("Center", splashPanel.getSplashComponent());
+                    pack();
+                }
+            });
+        } catch (Exception e) {
+            e.printStackTrace(); // Not much we can do other and print
+        }
+    }
+
+    @Override
+    public void removeSplash() {
+
+        // Loading done. Remove splash screen.
+        if (splashPanel == null) {
+            return;
+        }
+        splashPanel.stopAnimation();
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+
+                public void run() {
+                    splashPanel.getSplashComponent().setVisible(false);
+                    splashPanel.stopAnimation();
+                    remove(splashPanel.getSplashComponent());
+                    splashPanel = null;
+                    // Re-add the applet
+                    remove(panel);
+                    add(panel);
+                    panel.setVisible(true);
+                    pack();
+                }
+            });
+        } catch (Exception e) {
+            e.printStackTrace(); // Not much we can do other and print
+        }
+    }
+
+    @Override
+    public int getSplashWidth() {
+        if (splashPanel != null) {
+            return splashPanel.getPluginWidth();
+        } else {
+            return -1;
+        }
+    }
+
+    @Override
+    public int getSplashHeigth() {
+        if (splashPanel != null) {
+            return splashPanel.getPluginHeight();
+        } else {
+            return -1;
+        }
+    }
+   
+
     private static class AppletEventListener implements AppletListener {
         final Frame frame;
         final PluginAppletViewer appletViewer;
@@ -401,7 +517,6 @@
             panelLock.lock();
             panelLive.signalAll();
             panelLock.unlock();
-
             switch (evt.getID()) {
                 case AppletPanel.APPLET_RESIZE: {
                     if (src != null) {
@@ -436,6 +551,23 @@
 
                     break;
                 }
+                case AppletPanel.APPLET_START: {
+                    String s="Error1 detected";
+                    PluginDebug.debug(s);
+                    if (src.status != AppletPanel.APPLET_INIT && src.status != AppletPanel.APPLET_STOP) {
+                        SplashPanel sp=SplashUtils.getErrorSplashScreen(appletViewer.panel.getWidth(), appletViewer.panel.getHeight(), new Exception(s));
+                        appletViewer.replaceSplash(sp);
+                    }
+
+                    break;
+                }
+                case AppletPanel.APPLET_ERROR: {
+                    String s="Error2 detected";
+                    PluginDebug.debug(s);
+                        SplashPanel sp=SplashUtils.getErrorSplashScreen(appletViewer.panel.getWidth(), appletViewer.panel.getHeight(), new Exception(s));
+                        appletViewer.replaceSplash(sp);
+                    break;
+                }
             }
         }
     }
@@ -517,6 +649,8 @@
                 waitForAppletInit(applets.get(identifier).panel);
 
                 // Should we proceed with reframing?
+                 PluginDebug.debug("Init complete");
+
                 if (updateStatus(identifier, PAV_INIT_STATUS.REFRAME_COMPLETE).equals(PAV_INIT_STATUS.INACTIVE)) {
                     destroyApplet(identifier);
                     return;
@@ -656,6 +790,8 @@
      */
     public static void waitForAppletInit(NetxPanel panel) {
 
+        System.err.println("Waiting for applet init");
+
         // Wait till initialization finishes
         long maxTimeToSleep = APPLET_TIMEOUT;
 
@@ -2094,7 +2230,7 @@
      * the parent class's update() just does a couple of checks (both of
      * which are accounted for) and then calls paint anyway.
      */
-    public void update(Graphics g) {
+    public void paint(Graphics g) {
 
         // If the image or the graphics don't exist, create new ones
         if (bufFrameImg == null || bufFrameImgGraphics == null) {
@@ -2103,11 +2239,18 @@
         }
 
         // Paint off-screen
-        paint(bufFrameImgGraphics);
+        for (Component c: this.getComponents()) {
+                c.update(bufFrameImgGraphics);
+        }
 
         // Draw the painted image
         g.drawImage(bufFrameImg, 0, 0, this);
     }
+  
+    public void update(Graphics g) {
+        paint(g);
+    }
+
 
     /**
      * Waits on a given condition queue until timeout.
-------------- next part --------------
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashScreenTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashScreenTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,167 @@
+/* SplashScreenTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import java.awt.BorderLayout;
+import java.awt.event.ComponentEvent;
+import java.awt.event.ComponentListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.awt.image.BufferedImage;
+import javax.swing.JDialog;
+
+import net.sourceforge.jnlp.JNLPSplashScreen;
+import net.sourceforge.jnlp.splashscreen.parts.InfoItem;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ErrorSplashScreenTest extends JDialog {
+
+    static int width = JNLPSplashScreen.DEF_WIDTH;
+    static int height = JNLPSplashScreen.DEF_HEIGHT;
+    static SplashErrorPanel panel;
+
+    public ErrorSplashScreenTest() {
+
+        setSize(width - getInsets().left - getInsets().right, height - getInsets().bottom - getInsets().top);
+//   Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
+//    int x = (int) ((dimension.getWidth() - getWidth()) / 2);
+//    int y = (int) ((dimension.getHeight() - getHeight()) / 2);
+        //setLocation(x, y);
+        setLocationRelativeTo(null);
+        this.pack();
+        Exception ex = new Exception("Hi there");
+        panel = SplashUtils.getErrorSplashScreen(width, height, SplashUtils.SplashReason.JAVAWS, ex);
+        InformationElement ie = new InformationElement();
+        ie.setHomepage("http://someones.org/amazing?page");
+        ie.setTitle("Testing information title");
+        ie.setvendor("IcedTea-Web team");
+        ie.addDescription("Testing null description");
+        ie.addDescription("tsting twoline des ...break\ncription of kind short", InfoItem.descriptionKindShort);
+        panel.setInformationElement(ie);
+        panel.setVersion("1.2-re45fdg");
+        setLayout(new BorderLayout());
+        getContentPane().add(panel.getSplashComponent(), BorderLayout.CENTER);
+        addComponentListener(new ComponentListener() {
+
+            @Override
+            public void componentShown(ComponentEvent e) {
+            }
+
+            @Override
+            public void componentResized(ComponentEvent e) {
+                //panel.getSplashComponent().setSize(getWidth(), getHeight());
+                //panel.adjustForSize(getWidth(), getHeight());
+            }
+
+            @Override
+            public void componentMoved(ComponentEvent e) {
+            }
+
+            @Override
+            public void componentHidden(ComponentEvent e) {
+            }
+        });
+    }
+
+    @Test
+    public void splashScreenTestsExists() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        Assert.assertTrue(true);
+    }
+
+    @Test
+    public void splashScreenTestsPaint0() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(0);
+        panel.paint(buf.createGraphics());
+        //ImageFontCutterTest.save(buf,"e0");
+    }
+
+    @Test
+    public void splashScreenTestsPaint50() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(50);
+        panel.paint(buf.createGraphics());
+        // ImageFontCutterTest.save(buf,"e50");
+    }
+
+    @Test
+    public void splashScreenTestsPaint100() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(100);
+        panel.paint(buf.createGraphics());
+        //  ImageFontCutterTest.save(buf,"e100");
+    }
+
+    public static void main(String args[]) {
+        ErrorSplashScreenTest app = new ErrorSplashScreenTest();
+        app.setVisible(true);
+        app.addWindowListener(
+                new WindowAdapter() {
+
+                    @Override
+                    public void windowClosing(WindowEvent e) {
+                        System.exit(0);
+                    }
+                });
+        panel.setPercentage(30);
+        //panel.startAnimation();
+
+        try {
+            Thread.sleep(10000);
+        } catch (Exception e) {
+        }
+
+        panel.stopAnimation();
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashUtilsTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashUtilsTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,218 @@
+/* SplashUtils.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import java.util.HashMap;
+import java.util.Map;
+import net.sourceforge.jnlp.splashscreen.impls.*;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ErrorSplashUtilsTest {
+
+    private void fakeEnvironment(Map original) throws Exception {
+        SplashUtilsTest.fakeEnvironment(original);
+    }
+
+    private Map getEnvironment() throws Exception {
+        return SplashUtilsTest.getEnvironment();
+    }
+
+    private static final class JNLPSplashScreen {
+
+        static SplashPanel determineCallerTest() {
+            return SplashUtils.getErrorSplashScreen(100, 100, null);
+        }
+    }
+
+    @Test
+    public void determineCallerTest() {
+        SplashPanel p1 = SplashUtils.getErrorSplashScreen(100, 100, null);
+        Assert.assertEquals(SplashUtils.SplashReason.APPLET, p1.getSplashReason());
+        SplashPanel p2 = JNLPSplashScreen.determineCallerTest();
+        Assert.assertEquals(SplashUtils.SplashReason.JAVAWS, p2.getSplashReason());
+    }
+
+    @Test
+    public void testgetErrorSplashScreen1() throws Exception {
+        Map fake1 = new HashMap();
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, null);
+            Assert.assertTrue(sa instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, new Exception("oj"));
+            Assert.assertTrue(sw instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen2() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.DEFAULT);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, new Exception("oj"));
+            Assert.assertTrue(sa instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, null);
+            Assert.assertTrue(sw instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen3() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.NONE);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.DEFAULT);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, null);
+            Assert.assertTrue(sa instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, new Exception("oj"));
+            Assert.assertTrue(sw == null);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen4() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.NONE);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, new Exception("oj"));
+            Assert.assertTrue(sa == null);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, new Exception("oj"));
+            Assert.assertTrue(sw instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen5() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.NONE);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.NONE);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, null);
+            Assert.assertTrue(sa == null);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, null);
+            Assert.assertTrue(sw == null);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen6() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, "fgdthyfjtuk");
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, new Exception("oj"));
+            Assert.assertTrue(sa instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, new Exception("oj"));
+            Assert.assertTrue(sw instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+
+    @Test
+    public void testgetErrorSplashScreen7() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, "egtrutkyukl");
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.APPLET, null);
+            Assert.assertTrue(sa instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getErrorSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS, null);
+            Assert.assertTrue(sw instanceof DefaultErrorSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/SplashScreenTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/SplashScreenTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,185 @@
+/* SplashScreenTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import java.awt.BorderLayout;
+import java.awt.event.ComponentEvent;
+import java.awt.event.ComponentListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.awt.image.BufferedImage;
+import javax.swing.JDialog;
+
+import net.sourceforge.jnlp.JNLPSplashScreen;
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.ImageFontCutterTest;
+import net.sourceforge.jnlp.splashscreen.parts.InfoItem;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class SplashScreenTest extends JDialog {
+
+    static int width = JNLPSplashScreen.DEF_WIDTH;
+    static int height = JNLPSplashScreen.DEF_HEIGHT;
+    static SplashPanel panel;
+    private static boolean swap = true;
+
+    public SplashScreenTest() {
+
+        setSize(width - getInsets().left - getInsets().right, height - getInsets().bottom - getInsets().top);
+//   Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
+//    int x = (int) ((dimension.getWidth() - getWidth()) / 2);
+//    int y = (int) ((dimension.getHeight() - getHeight()) / 2);
+        //setLocation(x, y);
+        setLocationRelativeTo(null);
+        this.pack();
+        panel = SplashUtils.getSplashScreen(width, height, SplashUtils.SplashReason.JAVAWS);
+        InformationElement ie = new InformationElement();
+        ie.setHomepage("http://someones.org/amazing?page");
+        ie.setTitle("Testing information title");
+        ie.setvendor("IcedTea-Web team");
+        ie.addDescription("Testing null description");
+        ie.addDescription("tsting twoline des ...break\ncription of kind short", InfoItem.descriptionKindShort);
+        //panel.setInformationElement(ie);
+        //panel.setVersion("1.2-re45fdg");
+        setLayout(new BorderLayout());
+        getContentPane().add(panel.getSplashComponent(), BorderLayout.CENTER);
+
+        addComponentListener(new ComponentListener() {
+
+            @Override
+            public void componentShown(ComponentEvent e) {
+            }
+
+            @Override
+            public void componentResized(ComponentEvent e) {
+                //panel.getSplashComponent().setSize(getWidth(), getHeight());
+                //panel.adjustForSize(getWidth(), getHeight());
+            }
+
+            @Override
+            public void componentMoved(ComponentEvent e) {
+            }
+
+            @Override
+            public void componentHidden(ComponentEvent e) {
+            }
+        });
+    }
+
+    @Test
+    public void splashScreenTestsExists() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        Assert.assertTrue(true);
+    }
+
+    @Test
+    public void splashScreenTestsPaint0() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(0);
+        panel.paint(buf.createGraphics());
+        //   ImageFontCutterTest.save(buf,"s0");
+    }
+
+    @Test
+    public void splashScreenTestsPaint50() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(50);
+        panel.paint(buf.createGraphics());
+        //  ImageFontCutterTest.save(buf,"s50");
+    }
+
+    @Test
+    public void splashScreenTestsPaint100() {
+        //to silence junit,and test is that thsi class was instantiated ;)
+        panel.setPluginWidth(width);
+        panel.setPluginHeight(height);
+        panel.adjustForSize();
+        BufferedImage buf = new BufferedImage(panel.getPluginWidth(), panel.getPluginHeight(), BufferedImage.TYPE_INT_ARGB);
+        panel.setPercentage(100);
+        panel.paint(buf.createGraphics());
+        // ImageFontCutterTest.save(buf,"s100");
+    }
+
+    public static void main(String args[]) {
+        SplashScreenTest app = new SplashScreenTest();
+        app.setVisible(true);
+
+        app.addWindowListener(
+                new WindowAdapter() {
+
+                    @Override
+                    public void windowClosing(WindowEvent e) {
+                        System.exit(0);
+                    }
+                });
+
+        panel.startAnimation();
+
+        try {
+            Thread.sleep(5000);
+        } catch (Exception e) {
+        }
+        //not needed
+        //panel.stopAnimation();
+        if (swap) {
+            SplashErrorPanel r = SplashUtils.getErrorSplashScreen(panel.getPluginWidth(), panel.getPluginHeight(), SplashUtils.SplashReason.JAVAWS, null);
+            app.remove(panel.getSplashComponent());
+            r.setPercentage(panel.getPercentage());
+            r.adjustForSize();
+            panel = r;
+            app.add(panel.getSplashComponent());
+            app.validateTree();
+            //app.pack();
+            //app.setVisible(true);
+            try {
+                Thread.sleep(10000);
+            } catch (Exception e) {
+            }
+        }
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/SplashUtilsTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/SplashUtilsTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,253 @@
+/* SplashUtils.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import java.lang.reflect.Field;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
+import net.sourceforge.jnlp.splashscreen.impls.*;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class SplashUtilsTest {
+
+
+
+    @Test
+    public void determineCallerTest() {
+        modifyRuntime(false);
+        SplashPanel p1 = SplashUtils.getSplashScreen(100, 100);
+        Assert.assertEquals(SplashUtils.SplashReason.APPLET, p1.getSplashReason());
+        modifyRuntime(true);
+        SplashPanel p2 = SplashUtils.getSplashScreen(100, 100);
+        Assert.assertEquals(SplashUtils.SplashReason.JAVAWS, p2.getSplashReason());
+    }
+
+    public static Map<String, String> getEnvironment() throws Exception {
+        Class[] classes = Collections.class.getDeclaredClasses();
+        Map<String, String> env = System.getenv();
+        for (Class cl : classes) {
+            if ("java.util.Collections$UnmodifiableMap".equals(cl.getName())) {
+                Field field = cl.getDeclaredField("m");
+                field.setAccessible(true);
+                Object obj = field.get(env);
+                Map<String, String> map = (Map<String, String>) obj;
+                return map;
+            }
+        }
+        return null;
+    }
+
+    public static void fakeEnvironment(Map<String, String> newenv) throws Exception {
+        Class[] classes = Collections.class.getDeclaredClasses();
+        Map<String, String> env = System.getenv();
+        for (Class cl : classes) {
+            if ("java.util.Collections$UnmodifiableMap".equals(cl.getName())) {
+                Field field = cl.getDeclaredField("m");
+                field.setAccessible(true);
+                Object obj = field.get(env);
+                Map<String, String> map = (Map<String, String>) obj;
+                map.clear();
+                map.putAll(newenv);
+            }
+        }
+    }
+
+    @Test
+    public void testGetSplashScreen1() throws Exception {
+        Map fake1 = new HashMap();
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testGetSplashScreen2() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.DEFAULT);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+
+    @Test
+    public void testGetSplashScreen3() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.NONE);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.DEFAULT);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw == null);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testGetSplashScreen4() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.NONE);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa == null);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+
+    }
+
+    @Test
+    public void testGetSplashScreen5() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.NONE);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, SplashUtils.NONE);
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa == null);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw == null);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+    }
+
+    @Test
+    public void testGetSplashScreen6() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, SplashUtils.DEFAULT);
+        fake1.put(SplashUtils.ICEDTEA_WEB_PLUGIN_SPLASH, "fgdthyfjtuk");
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+
+    @Test
+    public void testGetSplashScreen7() throws Exception {
+        Map fake1 = new HashMap();
+        fake1.put(SplashUtils.ICEDTEA_WEB_SPLASH, "egtrutkyukl");
+        Map original = getEnvironment();
+        Assert.assertNotNull(original);
+        try {
+            fakeEnvironment(fake1);
+            SplashPanel sa = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.APPLET);
+            Assert.assertTrue(sa instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sa.getSplashReason() == SplashUtils.SplashReason.APPLET);
+            SplashPanel sw = SplashUtils.getSplashScreen(100, 100, SplashUtils.SplashReason.JAVAWS);
+            Assert.assertTrue(sw instanceof DefaultSplashScreen2012);
+            Assert.assertTrue(sw.getSplashReason() == SplashUtils.SplashReason.JAVAWS);
+        } finally {
+            fakeEnvironment(original);
+        }
+
+
+    }
+
+    private static void modifyRuntime(boolean b) {
+        try{
+        setStatic(JNLPRuntime.class.getDeclaredField("isWebstartApplication"), b);
+        }catch(Exception ex){
+            throw new RuntimeException(ex);
+        }
+    }
+   private  static void setStatic(Field field, Object newValue) throws Exception {
+      field.setAccessible(true);
+      field.set(null, newValue);
+   }
+
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,108 @@
+/* BasePainterTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.BasePainter;
+import java.awt.image.BufferedImage;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.impls.DefaultSplashScreen2012;
+import org.junit.Assert;
+
+
+import org.junit.Test;
+
+public class BasePainterTest {
+
+    @Test
+    public void scaleTest() {
+        Assert.assertEquals(10, BasePainter.scale(2, 4, 5), 0.1d);
+        Assert.assertEquals(4, BasePainter.scale(4, 2, 8), 0.1d);
+    }
+
+    @Test
+    public void getRatioTest() {
+        Assert.assertEquals(2, BasePainter.getRatio(2, 4), 0.1d);
+        Assert.assertEquals(0.5, BasePainter.getRatio(4, 2), 0.1d);
+    }
+
+    @Test
+    public void incLevel2Test() {
+        BasePainter bp = new BasePainter(new DefaultSplashScreen2012(100, 100, SplashReason.APPLET));
+        int l1 = bp.getWaterLevel();
+        int l2 = bp.getAnimationsPosition();
+        bp.increaseAnimationPosition();
+        Assert.assertFalse(l2 == bp.getAnimationsPosition());
+        Assert.assertTrue(l1 == bp.getWaterLevel());
+    }
+
+    @Test
+    public void adjustForSizeTest() {
+        BasePainter bp = new BasePainter(new DefaultSplashScreen2012(100, 100, SplashReason.APPLET));
+        bp.adjustForSize(100, 100);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        BufferedImage i1 = bp.prerenderStill();
+        Assert.assertEquals(100, i1.getWidth());
+        Assert.assertEquals(100, i1.getHeight());
+        bp.adjustForSize(20, 20);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        Assert.assertEquals(20, bp.prerenderedStuff.getWidth());
+        Assert.assertEquals(20, bp.prerenderedStuff.getHeight());
+        Assert.assertFalse(i1.getWidth() == bp.prerenderedStuff.getWidth());
+        Assert.assertFalse(i1.getHeight() == bp.prerenderedStuff.getHeight());
+
+
+    }
+
+    @Test
+    public void adjustForSizeTest2() {
+        BasePainter bp = new BasePainter(new DefaultSplashScreen2012(0, 0, SplashReason.APPLET), false);
+        Assert.assertNull(bp.prerenderedStuff);
+        bp.master.setPluginHeight(10);
+        bp.master.setPluginWidth(10);
+        BufferedImage i1 = bp.prerenderStill();
+        Assert.assertEquals(10, i1.getWidth());
+        Assert.assertEquals(10, i1.getHeight());
+        bp.adjustForSize(20, 20);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        Assert.assertEquals(20, bp.prerenderedStuff.getWidth());
+        Assert.assertEquals(20, bp.prerenderedStuff.getHeight());
+        Assert.assertFalse(i1.getWidth() == bp.prerenderedStuff.getWidth());
+        Assert.assertFalse(i1.getHeight() == bp.prerenderedStuff.getHeight());
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurveTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurveTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,307 @@
+/* ControlCurveTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+/** This class represents a curve defined by a sequence of control points */
+/*  Part of NatCubic implementation, inspire by http://www.cse.unsw.edu.au/~lambert/*/
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.ControlCurve;
+import java.awt.*;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ControlCurveTest {
+
+    @Test
+    public void setGetTests() {
+        Polygon p1 = new Polygon();
+        Polygon p2 = new Polygon();
+        Polygon p3 = new Polygon();
+        ControlCurve cc = new ControlCurve();
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setSourcePolygon(p1);
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertEquals(p1, cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setWithPoints(false);
+        Assert.assertFalse(cc.isWithPoints());
+
+        cc = new ControlCurve(p2);
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertEquals(p2, cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setWithPoints(false);
+        Assert.assertFalse(cc.isWithPoints());
+        cc.setSourcePolygon(p3);
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertEquals(p3, cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setWithPoints(false);
+        Assert.assertFalse(cc.isWithPoints());
+        cc.setWithPoints(true);
+        Assert.assertTrue(cc.isWithPoints());
+
+    }
+
+    @Test
+    public void sqrTest() {
+        Assert.assertEquals(25, ControlCurve.sqr(5));
+    }
+    static int[] xs = {0, 100, 100, 0};
+    static int[] ys = {0, 0, 100, 1000};
+
+    static ControlCurve getTestInstance() {
+        ControlCurve cc = new ControlCurve();
+        cc.addPoint(xs[0], ys[0]);
+        cc.addPoint(xs[1], ys[1]);
+        cc.addPoint(xs[2], ys[2]);
+        cc.addPoint(xs[3], ys[3]);
+        return cc;
+
+    }
+
+    @Test
+    public void selectPointTest() {
+        ControlCurve cc = getTestInstance();
+        int i = cc.selectPoint(-50, -50);
+        Assert.assertEquals(-1, i);
+        i = cc.selectPoint(-3, 3);
+        Assert.assertEquals(0, i);
+        i = cc.selectPoint(97, 97);
+        Assert.assertEquals(2, i);
+        i = cc.selectPoint(100, 50);
+        Assert.assertEquals(-1, i);
+    }
+
+    @Test
+    public void addPoint() {
+        ControlCurve cc = new ControlCurve();
+        Assert.assertEquals(0, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(1, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(2, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(100, 100);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+    }
+
+    @Test
+    public void setPointTest1() {
+        ControlCurve cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(4);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(3);
+        cc.setPoint(10, 20);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        Assert.assertEquals(20, cc.getSourcePolygon().ypoints[3]);
+        Assert.assertEquals(10, cc.getSourcePolygon().xpoints[3]);
+    }
+
+    @Test
+    public void setPointTest2() {
+        ControlCurve cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setPoint(-1, 10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.setPoint(4, 10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.setPoint(3, 10, 20);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        Assert.assertEquals(20, cc.getSourcePolygon().ypoints[3]);
+        Assert.assertEquals(10, cc.getSourcePolygon().xpoints[3]);
+
+    }
+
+    @Test
+    public void removePoint2() {
+        ControlCurve cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.removePoint(-1);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.removePoint(4);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.removePoint(3);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+
+    }
+
+    public void removePoint1() {
+        ControlCurve cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(4);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+        cc.setSelection(0);
+        cc.removePoint();
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i + 1], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i + 1], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNull(cc.getResult());
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/CubicTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/CubicTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,57 @@
+/* CubicTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.Cubic;
+import org.junit.Assert;
+import org.junit.Test;
+
+/** this class represents a cubic polynomial */
+/*  Part of NatCubic implementation, inspire by http://www.cse.unsw.edu.au/~lambert/*/
+public class CubicTest {
+
+    @Test
+    public void cubicTest() {
+        Cubic c1 = new Cubic(1, 2, 3, 4);
+        Assert.assertTrue(new Float(1).equals(c1.a));
+        Assert.assertTrue(new Float(2).equals(c1.b));
+        Assert.assertTrue(new Float(3).equals(c1.c));
+        Assert.assertTrue(new Float(4).equals(c1.d));
+        Assert.assertTrue(new Float(586).equals(c1.eval(5)));
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainterTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainterTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,113 @@
+/* ErrorPainterTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.ErrorPainter;
+import java.awt.Color;
+import java.awt.image.BufferedImage;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.impls.DefaultSplashScreen2012;
+import org.junit.Assert;
+import org.junit.Test;
+
+public final class ErrorPainterTest {
+
+    @Test
+    public void interpolTest() {
+        Assert.assertEquals(15, ErrorPainter.interpol(4, 2, 10, 20), 0.1d);
+        Assert.assertEquals(-15, ErrorPainter.interpol(4, 2, -20, -10), 0.1d);
+        Assert.assertEquals(30, ErrorPainter.interpol(2, 4, 10, 20), 0.1d);
+    }
+
+    @Test
+    public void interpolColorTest() {
+        Color c1 = new Color(0, 0, 0);
+        Color c2 = new Color(200, 200, 200);
+        Color c3 = new Color(100, 100, 100);
+        Color c4 = ErrorPainter.interpolColor(4, 2, c1, c2);
+        Assert.assertEquals(c3, c4);
+
+    }
+
+//    public static void main(String[] a) {
+//        Color c1 = new Color(250, 50, 0, 50);
+//        Color c2 = new Color(0, 0, 250, 100);
+//        for (int i = 0; i < 21; i++) {
+//            Color q = ErrorPainter.interpolColor(20, i, c1, c2);
+//            System.out.println(q.toString());
+//            System.out.println(q.getAlpha());
+//        }
+//    }
+    @Test
+    public void adjustForSizeTest() {
+        ErrorPainter bp = new ErrorPainter(new DefaultSplashScreen2012(100, 100, SplashReason.APPLET));
+        bp.master.setPluginHeight(100);
+        bp.master.setPluginWidth(100);
+        bp.adjustForSize(100, 100);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        BufferedImage i1 = bp.prerenderStill();
+        Assert.assertEquals(100, i1.getWidth());
+        Assert.assertEquals(100, i1.getHeight());
+        bp.adjustForSize(20, 20);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        Assert.assertEquals(20, bp.prerenderedStuff.getWidth());
+        Assert.assertEquals(20, bp.prerenderedStuff.getHeight());
+        Assert.assertFalse(i1.getWidth() == bp.prerenderedStuff.getWidth());
+        Assert.assertFalse(i1.getHeight() == bp.prerenderedStuff.getHeight());
+
+
+    }
+
+    @Test
+    public void adjustForSizeTest2() {
+        ErrorPainter bp = new ErrorPainter(new DefaultSplashScreen2012(0, 0, SplashReason.APPLET), false);
+        Assert.assertNull(bp.prerenderedStuff);
+        bp.master.setPluginHeight(10);
+        bp.master.setPluginWidth(10);
+        BufferedImage i1 = bp.prerenderStill();
+        Assert.assertEquals(10, i1.getWidth());
+        Assert.assertEquals(10, i1.getHeight());
+        bp.adjustForSize(20, 20);
+        Assert.assertNotNull(bp.prerenderedStuff);
+        Assert.assertEquals(20, bp.prerenderedStuff.getWidth());
+        Assert.assertEquals(20, bp.prerenderedStuff.getHeight());
+        Assert.assertFalse(i1.getWidth() == bp.prerenderedStuff.getWidth());
+        Assert.assertFalse(i1.getHeight() == bp.prerenderedStuff.getHeight());
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ImageFontCutterTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ImageFontCutterTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,127 @@
+/* ImageFontCutterTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import javax.imageio.ImageIO;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ImageFontCutterTest {
+
+    @Test
+    public void getSetTest() {
+        BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bi.createGraphics();
+        Font f1 = g2d.getFont().deriveFont(Font.ITALIC);
+        Font f2 = g2d.getFont().deriveFont(Font.BOLD);
+        String s = "Hello";
+        ImageFontCutter ifc = new ImageFontCutter(f1, s);
+        Assert.assertEquals(-1, ifc.getHeight());
+        Assert.assertEquals(-1, ifc.getWidth());
+        Assert.assertEquals(f1, ifc.getFont());
+        Assert.assertNull(ifc.getImg());
+        Assert.assertEquals(s, ifc.getText());
+        Assert.assertEquals(Color.BLACK, ifc.getTextOutline());
+        ifc.setImg(bi);
+        Assert.assertEquals(100, ifc.getHeight());
+        Assert.assertEquals(100, ifc.getWidth());
+        Assert.assertEquals(f1, ifc.getFont());
+        Assert.assertEquals(bi, ifc.getImg());
+        Assert.assertEquals(s, ifc.getText());
+        Assert.assertEquals(Color.BLACK, ifc.getTextOutline());
+
+        ImageFontCutter xfc = new ImageFontCutter(f1, s, Color.red);
+        xfc.setImg(bi);
+        xfc.setFont(f2);
+        String ss = "HelloHello";
+        Assert.assertEquals(100, xfc.getHeight());
+        Assert.assertEquals(100, xfc.getWidth());
+        Assert.assertEquals(f2, xfc.getFont());
+        Assert.assertEquals(bi, xfc.getImg());
+        Assert.assertEquals(s, xfc.getText());
+        Assert.assertEquals(Color.red, xfc.getTextOutline());
+        xfc.setTextOutline(Color.white);
+        Assert.assertEquals(Color.white, xfc.getTextOutline());
+
+    }
+
+    @Test
+    public void cutToTest() {
+        BufferedImage bi1 = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d1 = bi1.createGraphics();
+        g2d1.setColor(Color.red);
+        g2d1.fillRect(0, 0, 100, 100);
+
+
+        BufferedImage bi2 = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d2 = bi2.createGraphics();
+        g2d2.setColor(Color.blue);
+        g2d2.fillRect(0, 0, 100, 100);
+        ImageFontCutter ifc = new ImageFontCutter(g2d1.getFont().deriveFont(Font.BOLD, 130), "O");
+        ifc.setImg(bi1);
+        ifc.cutTo(g2d2, -5, 100);
+        Color c1 = new Color(bi2.getRGB(1, 1));
+        Assert.assertEquals(Color.blue, c1);
+        Color c2 = new Color(bi2.getRGB(50, 50));
+        Assert.assertEquals(Color.blue, c2);
+        Color c3 = new Color(bi2.getRGB(30, 30));
+        Assert.assertEquals(Color.red, c3);
+        Color c4 = new Color(bi2.getRGB(70, 70));
+        Assert.assertEquals(Color.red, c4);
+        Color c5 = new Color(bi2.getRGB(26, 52));
+        Assert.assertEquals(Color.black, c5);
+
+
+    }
+
+    public static void save(BufferedImage bi1, String string) {
+        try {
+            String name = string;
+            if (name == null || name.trim().length() <= 0) {
+                name = "testImage";
+            }
+            ImageIO.write(bi1, "png", new File(System.getProperty("user.home") + "/Desktop/" + name + ".png"));
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingTextTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingTextTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,151 @@
+/* MovingTextTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.MovingText;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class MovingTextTest {
+
+    @Test
+    public void setGetTest() {
+        BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bi.createGraphics();
+        Font f1 = g2d.getFont().deriveFont(Font.ITALIC);
+        Font f2 = g2d.getFont().deriveFont(Font.BOLD);
+        String s = "Watter";
+        MovingText tw = new MovingText(s, f1);
+        Assert.assertEquals(-1, tw.getHeight());
+        Assert.assertEquals(-1, tw.getWidth());
+        Assert.assertEquals(f1, tw.getFont());
+        Assert.assertNull(tw.getImg());
+        Assert.assertEquals(s, tw.getText());
+        Assert.assertEquals(Color.BLACK, tw.getTextOutline());
+        Assert.assertEquals(Color.blue, tw.getWaterColor());
+        Assert.assertEquals(Color.white, tw.getBgColor());
+        Assert.assertEquals(0, tw.getPercentageOfWater());
+        tw.setBgColor(Color.yellow);
+        tw.setWaterColor(Color.orange);
+        tw.setPercentageOfWater(20);
+        Assert.assertEquals(Color.orange, tw.getWaterColor());
+        Assert.assertEquals(Color.yellow, tw.getBgColor());
+        Assert.assertEquals(20, tw.getPercentageOfWater());
+
+    }
+
+    private static int getAvgColor(Color c) {
+        Assert.assertEquals(c.getRed(), c.getBlue());
+        Assert.assertEquals(c.getRed(), c.getGreen());
+        return c.getRed();
+    }
+
+    private static int getAvgColor(int i) {
+        return getAvgColor(new Color(i));
+    }
+
+    private static int getAvgColor(BufferedImage m, int x, int y) {
+        return getAvgColor(m.getRGB(x, y));
+    }
+
+    @Test
+    public void getBackground() {
+        MovingText ifc = getInstance();
+        BufferedImage bic = ifc.getBackground();
+        int w = bic.getWidth();
+        int h = bic.getHeight();
+        ifc.setPercentageOfWater(0);
+        bic = ifc.getBackground();
+        Assert.assertTrue(getAvgColor(bic, 3 * w / 4, h / 2) > getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertTrue(getAvgColor(bic, w / 4, h / 2) < getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertEquals(new Color(bic.getRGB(w - w / 4, 2 * h / 3)), new Color(bic.getRGB(w - w / 4, h / 3)));
+        ifc.setPercentageOfWater(w / 2);
+        bic = ifc.getBackground();
+        Assert.assertTrue(getAvgColor(bic, 3 * w / 4, h / 2) > getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertTrue(getAvgColor(bic, w / 4, h / 2) > getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertEquals(new Color(bic.getRGB(w - w / 3, 2 * h / 3)), new Color(bic.getRGB(w - w / 3, h / 3)));
+        ifc.setPercentageOfWater(w);
+        bic = ifc.getBackground();
+        Assert.assertTrue(getAvgColor(bic, 3 * w / 4, h / 2) < getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertTrue(getAvgColor(bic, w / 4, h / 2) > getAvgColor(bic, 2 * w / 4, h / 2));
+        Assert.assertEquals(new Color(bic.getRGB(w - w / 4, h / 3)), new Color(bic.getRGB(w - w / 4, h / 2)));
+
+
+
+    }
+
+    private MovingText getInstance() {
+        BufferedImage bi1 = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+        Font f = bi1.createGraphics().getFont().deriveFont(Font.BOLD, 130);
+        MovingText ifc = new MovingText("O O", f);
+        return ifc;
+    }
+
+    private static void assertNotEquals(Object o1, Object o2) {
+        Assert.assertFalse(o1.equals(o2));
+
+    }
+
+    @Test
+    public void cutToTest() {
+        MovingText ifc = getInstance();
+        BufferedImage bic = ifc.getBackground();
+        int w = bic.getWidth();
+        int h = bic.getHeight();
+        bic = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        ifc.cutTo(bic.createGraphics(), 0, h);
+        Color cc = new Color(0, 0, 0);
+        assertNotEquals(cc, new Color(bic.getRGB(52, 142)));
+        assertNotEquals(cc, new Color(bic.getRGB(170, 110)));
+        assertNotEquals(cc, new Color(bic.getRGB(52, 62)));
+        assertNotEquals(cc, new Color(bic.getRGB(245, 85)));
+
+        //well this should be acctually rgba 0,0,0,0 but somehow this was no passig
+        //you can confirm with:
+        //ImageFontCutterTest.save(bic, "halfFiledOus")
+        Assert.assertEquals(cc, new Color(bic.getRGB(137, 127)));
+        Assert.assertEquals(cc, new Color(bic.getRGB(137, 2)));
+
+
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosedTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosedTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,264 @@
+/* NatCubicClosedTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.NatCubicClosed;
+import java.awt.Polygon;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class NatCubicClosedTest {
+
+    @Test
+    public void setGetTests() {
+        Polygon p1 = new Polygon();
+        p1.addPoint(10, 23);
+        p1.addPoint(12, -31);
+        NatCubicClosed cc = new NatCubicClosed();
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        Exception ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setSourcePolygon(p1);
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertEquals(p1, cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setWithPoints(false);
+        Assert.assertFalse(cc.isWithPoints());
+        cc.resetResult();
+        Assert.assertNull(cc.getResult());
+
+
+
+    }
+    static int[] xs = {0, 100, 100, 0};
+    static int[] ys = {0, 0, 100, 1000};
+
+    static NatCubicClosed getTestInstance() {
+        NatCubicClosed cc = new NatCubicClosed();
+        cc.addPoint(xs[0], ys[0]);
+        cc.addPoint(xs[1], ys[1]);
+        cc.addPoint(xs[2], ys[2]);
+        cc.addPoint(xs[3], ys[3]);
+        return cc;
+
+    }
+
+    @Test
+    public void basicComputation() {
+        NatCubicClosed b = new NatCubicClosed();
+        b.addPoint(10, 10);
+        b.addPoint(50, 20);
+        b.addPoint(-10, -10);
+        b.calcualteAndSaveResult();
+        Assert.assertTrue(b.pts.npoints < b.result.npoints / 5);
+        Assert.assertEquals(b.result.xpoints[0], b.result.xpoints[b.result.npoints - 1]);
+        Assert.assertEquals(b.result.ypoints[0], b.result.ypoints[b.result.npoints - 1]);
+
+    }
+
+    @Test
+    public void addPoint() {
+        NatCubicClosed cc = new NatCubicClosed();
+        Assert.assertEquals(0, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        Exception ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(1, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(2, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.addPoint(100, 100);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+    }
+
+    @Test
+    public void setPointTest1() {
+        NatCubicClosed cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(4);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(3);
+        cc.setPoint(10, 20);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        Assert.assertEquals(20, cc.getSourcePolygon().ypoints[3]);
+        Assert.assertEquals(10, cc.getSourcePolygon().xpoints[3]);
+    }
+
+    @Test
+    public void removePoint2() {
+        NatCubicClosed cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(-1);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(4);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(3);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+
+    }
+
+    public void removePoint1() {
+        NatCubicClosed cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(4);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(0);
+        cc.removePoint();
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i + 1], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i + 1], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,264 @@
+/* NatCubicTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.NatCubic;
+import java.awt.Polygon;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class NatCubicTest {
+
+    @Test
+    public void setGetTests() {
+        Polygon p1 = new Polygon();
+        p1.addPoint(10, 23);
+        p1.addPoint(12, -31);
+        NatCubic cc = new NatCubic();
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        Exception ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setSourcePolygon(p1);
+        Assert.assertNotNull(cc.getSourcePolygon());
+        Assert.assertEquals(p1, cc.getSourcePolygon());
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        Assert.assertTrue(cc.isWithPoints());
+        cc.setWithPoints(false);
+        Assert.assertFalse(cc.isWithPoints());
+        cc.resetResult();
+        Assert.assertNull(cc.getResult());
+
+
+
+    }
+    static int[] xs = {0, 100, 100, 0};
+    static int[] ys = {0, 0, 100, 1000};
+
+    static NatCubic getTestInstance() {
+        NatCubic cc = new NatCubic();
+        cc.addPoint(xs[0], ys[0]);
+        cc.addPoint(xs[1], ys[1]);
+        cc.addPoint(xs[2], ys[2]);
+        cc.addPoint(xs[3], ys[3]);
+        return cc;
+
+    }
+
+    @Test
+    public void basicComputation() {
+        NatCubic b = new NatCubic();
+        b.addPoint(10, 10);
+        b.addPoint(50, 20);
+        b.addPoint(-10, -10);
+        b.calcualteAndSaveResult();
+        Assert.assertTrue(b.pts.npoints < b.result.npoints / 5);
+        Assert.assertFalse(b.result.xpoints[0] == b.result.xpoints[b.result.npoints - 1]);
+        Assert.assertFalse(b.result.ypoints[0] == b.result.ypoints[b.result.npoints - 1]);
+
+    }
+
+    @Test
+    public void addPoint() {
+        NatCubic cc = new NatCubic();
+        Assert.assertEquals(0, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        Exception ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(1, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        ex = null;
+        try {
+            cc.calcualteAndSaveResult();
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        Assert.assertNull(cc.getResult());
+        cc.addPoint(10, 10);
+        Assert.assertEquals(2, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.addPoint(100, 100);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+    }
+
+    @Test
+    public void setPointTest1() {
+        NatCubic cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(4);
+        cc.setPoint(10, 10);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(3);
+        cc.setPoint(10, 20);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        Assert.assertEquals(20, cc.getSourcePolygon().ypoints[3]);
+        Assert.assertEquals(10, cc.getSourcePolygon().xpoints[3]);
+    }
+
+    @Test
+    public void removePoint2() {
+        NatCubic cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(-1);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(4);
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.removePoint(3);
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+
+    }
+
+    public void removePoint1() {
+        NatCubic cc = getTestInstance();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(-1);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(4);
+        cc.removePoint();
+        Assert.assertEquals(4, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 4; i++) {
+            Assert.assertEquals(ys[i], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNotNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+        cc.setSelection(0);
+        cc.removePoint();
+        Assert.assertEquals(3, cc.getSourcePolygon().npoints);
+        for (int i = 0; i < 3; i++) {
+            Assert.assertEquals(ys[i + 1], cc.getSourcePolygon().ypoints[i]);
+            Assert.assertEquals(xs[i + 1], cc.getSourcePolygon().xpoints[i]);
+        }
+        Assert.assertNull(cc.getResult());
+        cc.calcualteAndSaveResult();
+        Assert.assertNotNull(cc.getResult());
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefsTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefsTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,91 @@
+/* SplinesDefsTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.SplinesDefs;
+import java.awt.Point;
+import java.awt.Polygon;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class SplinesDefsTest {
+
+    private static Point[] testArray = {
+        new Point(0, 0),
+        new Point(100, 0),
+        new Point(100, 100),
+        new Point(0, 100)
+    };
+
+    @Test
+    public void polygonizeControlPointsTest() {
+
+        Polygon p = SplinesDefs.polygonizeControlPoints(testArray, 1d, 1d);
+        Assert.assertTrue(p.contains(50, 50));
+        Assert.assertFalse(p.contains(150, 150));
+        Assert.assertFalse(p.contains(-50, -50));
+        p = SplinesDefs.polygonizeControlPoints(testArray, 0.5d, 0.5d);
+        Assert.assertTrue(p.contains(20, 20));
+        Assert.assertFalse(p.contains(75, 75));
+        Assert.assertFalse(p.contains(-25, -25));
+        p = SplinesDefs.polygonizeControlPoints(testArray, 2d, 2d);
+        Assert.assertTrue(p.contains(150, 150));
+        Assert.assertFalse(p.contains(250, 250));
+        Assert.assertFalse(p.contains(-50, -50));
+
+
+    }
+
+    @Test
+    public void testApi() {
+        double x = 1d;
+        Polygon[] p = {SplinesDefs.getMainLeaf(x, x),
+            SplinesDefs.getMainLeafCurve(x, x),
+            SplinesDefs.getMainLeafStalk(x, x),
+            SplinesDefs.getMainLeafStalkCurve(x, x),
+            SplinesDefs.getSecondLeaf(x, x),
+            SplinesDefs.getSecondLeafCurve(x, x),
+            SplinesDefs.getSecondLeafStalk(x, x),
+            SplinesDefs.getSecondLeafStalkCurve(x, x)};
+        for (Polygon polygon : p) {
+            Assert.assertNotNull(polygon);
+            Assert.assertTrue(polygon.npoints > 5);
+
+        }
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevelTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevelTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,131 @@
+/* TextWithWaterLevelTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012;
+
+import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.TextWithWaterLevel;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TextWithWaterLevelTest {
+
+    @Test
+    public void setGetTest() {
+        BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bi.createGraphics();
+        Font f1 = g2d.getFont().deriveFont(Font.ITALIC);
+        Font f2 = g2d.getFont().deriveFont(Font.BOLD);
+        String s = "Watter";
+        TextWithWaterLevel tw = new TextWithWaterLevel(s, f1);
+        Assert.assertEquals(-1, tw.getHeight());
+        Assert.assertEquals(-1, tw.getWidth());
+        Assert.assertEquals(f1, tw.getFont());
+        Assert.assertNull(tw.getImg());
+        Assert.assertEquals(s, tw.getText());
+        Assert.assertEquals(Color.BLACK, tw.getTextOutline());
+        Assert.assertEquals(Color.blue, tw.getWaterColor());
+        Assert.assertEquals(Color.white, tw.getBgColor());
+        Assert.assertEquals(0, tw.getPercentageOfWater());
+        tw.setBgColor(Color.yellow);
+        tw.setWaterColor(Color.orange);
+        tw.setPercentageOfWater(20);
+        Assert.assertEquals(Color.orange, tw.getWaterColor());
+        Assert.assertEquals(Color.yellow, tw.getBgColor());
+        Assert.assertEquals(20, tw.getPercentageOfWater());
+
+    }
+
+    @Test
+    public void getBackground() {
+        TextWithWaterLevel ifc = getInstance();
+        ifc.setCachedPolygon(null);
+        ifc.setPercentageOfWater(50);
+        BufferedImage bic = ifc.getBackground();
+        int w = bic.getWidth();
+        int h = bic.getHeight();
+        Assert.assertEquals(Color.blue, new Color(bic.getRGB(w / 2, 2 * h / 3)));
+        Assert.assertEquals(Color.white, new Color(bic.getRGB(w / 2, h / 3)));
+        ifc.setCachedPolygon(null);
+        ifc.setPercentageOfWater(5);
+        bic = ifc.getBackground();
+        Assert.assertEquals(Color.white, new Color(bic.getRGB(w / 2, 2 * h / 3)));
+        Assert.assertEquals(Color.white, new Color(bic.getRGB(w / 2, h / 3)));
+        ifc.setCachedPolygon(null);
+        ifc.setPercentageOfWater(95);
+        bic = ifc.getBackground();
+        Assert.assertEquals(Color.blue, new Color(bic.getRGB(w / 2, 2 * h / 3)));
+        Assert.assertEquals(Color.blue, new Color(bic.getRGB(w / 2, h / 3)));
+
+
+
+    }
+
+    private TextWithWaterLevel getInstance() {
+        BufferedImage bi1 = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+        Font f = bi1.createGraphics().getFont().deriveFont(Font.BOLD, 130);
+        TextWithWaterLevel ifc = new TextWithWaterLevel("O O", f);
+        return ifc;
+    }
+
+    @Test
+    public void cutToTest() {
+        TextWithWaterLevel ifc = getInstance();
+        ifc.setPercentageOfWater(50);
+        BufferedImage bic = ifc.getBackground();
+        int w = bic.getWidth();
+        int h = bic.getHeight();
+        bic = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        ifc.cutTo(bic.createGraphics(), 0, h);
+        Assert.assertEquals(Color.blue, new Color(bic.getRGB(52, 142)));
+        Assert.assertEquals(Color.blue, new Color(bic.getRGB(170, 110)));
+        Assert.assertEquals(Color.white, new Color(bic.getRGB(52, 62)));
+        Assert.assertEquals(Color.white, new Color(bic.getRGB(245, 85)));
+
+        //well this should be acctually rgba 0,0,0,0 but somehow this was no passig
+        //you can confirm with:
+        //ImageFontCutterTest.save(bic, "halfFiledOus")
+        Assert.assertEquals(new Color(0, 0, 0), new Color(bic.getRGB(137, 127)));
+        Assert.assertEquals(new Color(0, 0, 0), new Color(bic.getRGB(137, 2)));
+
+
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreenTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreenTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,127 @@
+/* BasicComponentSplashScreenTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.awt.Graphics;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class BasicComponentErrorSplashScreenTest {
+
+    @Test
+    public void createAditionalInfoTest() {
+        BasicComponentSplashScreenImpl tested = new BasicComponentSplashScreenImpl();
+        String v = "2.118x08";
+        tested.setVersion(v);
+        tested.setSplashReason(SplashReason.APPLET);
+        String s1 = tested.createAditionalInfoTest();
+        Assert.assertNotNull("Not null input must result to something", s1);
+        Assert.assertTrue("Not null input must have version value", s1.contains(v));
+        Assert.assertTrue("Not null input must have version string", s1.contains("version"));
+        Assert.assertTrue("Not null input must have version string", s1.contains(SplashReason.APPLET.toString()));
+        tested.setVersion(null);
+        tested.setSplashReason(null);
+        String s2 = tested.createAditionalInfoTest();
+        Assert.assertNull("Not null input must result to something", s2);
+        tested.setSplashReason(null);
+        tested.setVersion(v);
+        Exception ex = null;
+        try {
+            String s3 = tested.createAditionalInfoTest();
+        } catch (Exception exx) {
+            ex = exx;
+        }
+        Assert.assertNotNull("Null reason vith set version must causes exception", ex);
+
+
+    }
+
+    @Test
+    public void setGetError() {
+        BasicComponentSplashScreenImpl tested = new BasicComponentSplashScreenImpl();
+        Exception ex = new Exception("ujuj");
+        tested.setLoadingException(ex);
+        Assert.assertEquals(ex, tested.getLoadingException());
+
+    }
+
+    private class BasicComponentSplashScreenImpl extends BasicComponentErrorSplashScreen {
+
+        public BasicComponentSplashScreenImpl() {
+        }
+
+        @Override
+        public void paintComponent(Graphics g) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void paint(Graphics g) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void adjustForSize() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void startAnimation() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void stopAnimation() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        public String createAditionalInfoTest() {
+            return super.createAditionalInfo();
+        }
+
+        @Override
+        public void setPercentage(int done) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public int getPercentage() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreenTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreenTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,118 @@
+/* BasicComponentSplashScreenTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.awt.Graphics;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class BasicComponentSplashScreenTest {
+
+    @Test
+    public void createAditionalInfoTest() {
+        BasicComponentSplashScreenImpl tested = new BasicComponentSplashScreenImpl();
+        String v = "2.118x08";
+        tested.setVersion(v);
+        tested.setSplashReason(SplashReason.APPLET);
+        String s1 = tested.createAditionalInfoTest();
+        Assert.assertNotNull("Not null input must result to something", s1);
+        Assert.assertTrue("Not null input must have version value", s1.contains(v));
+        Assert.assertTrue("Not null input must have version string", s1.contains("version"));
+        Assert.assertTrue("Not null input must have version string", s1.contains(SplashReason.APPLET.toString()));
+        tested.setVersion(null);
+        tested.setSplashReason(null);
+        String s2 = tested.createAditionalInfoTest();
+        Assert.assertNull("Not null input must result to something", s2);
+        tested.setSplashReason(null);
+        tested.setVersion(v);
+        Exception ex = null;
+        try {
+            String s3 = tested.createAditionalInfoTest();
+        } catch (Exception exx) {
+            ex = exx;
+        }
+        Assert.assertNotNull("Null reason vith set version must causes exception", ex);
+
+
+    }
+
+    private class BasicComponentSplashScreenImpl extends BasicComponentSplashScreen {
+
+        public BasicComponentSplashScreenImpl() {
+        }
+
+        @Override
+        public void paintComponent(Graphics g) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void paint(Graphics g) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void adjustForSize() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void startAnimation() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void stopAnimation() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        public String createAditionalInfoTest() {
+            return super.createAditionalInfo();
+        }
+
+        @Override
+        public void setPercentage(int done) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public int getPercentage() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItemTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItemTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,138 @@
+/* DescriptionInfoItemTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import junit.framework.Assert;
+import net.sourceforge.jnlp.ServerAccess;
+import org.junit.Test;
+
+public class DescriptionInfoItemTest {
+
+    private static final DescriptionInfoItem[] d = {new DescriptionInfoItem("Firm 1", null),
+        new DescriptionInfoItem("Firm 2", null),
+        new DescriptionInfoItem("Firm 3", "k1"),
+        new DescriptionInfoItem("Firm 4", "k2"),
+        new DescriptionInfoItem("Firm 6", "k1")};
+
+    @Test
+    public void setGetTest() {
+        DescriptionInfoItem di = new DescriptionInfoItem("a", "b");
+        Assert.assertEquals("a", di.getValue());
+        Assert.assertEquals("b", di.getKind());
+        Assert.assertEquals(InfoItem.description, di.getType());
+        di.setKind("q");
+        Assert.assertEquals("q", di.getKind());
+
+    }
+
+    @Test
+    public void isOfSameKindTests() {
+        boolean[] results = new boolean[]{true, true, false, false, false, true, true, false, false, false, false, false, true, false, true, false, false, false, true, false, false, false, true, false, true};
+        int x = -1;
+        for (int i = 0; i < d.length; i++) {
+            DescriptionInfoItem d1 = d[i];
+            for (int j = 0; j < d.length; j++) {
+                x++;
+                DescriptionInfoItem d2 = d[j];
+                ServerAccess.logOutputReprint(x + ": " + i + "x" + j + " " + d1.toString() + "x" + d2.toString() + "- same kind - " + d1.isOfSameKind(d2));
+                Assert.assertEquals(results[x], d1.isOfSameKind(d2));
+            }
+
+        }
+    }
+
+    @Test
+    public void isSameTest() {
+        boolean[] results = new boolean[]{true, true, false, false, false, true, true, false, false, false, false, false, true, false, true, false, false, false, true, false, false, false, true, false, true
+        };
+        int x = -1;
+        for (int i = 0; i < d.length; i++) {
+            DescriptionInfoItem d1 = d[i];
+            for (int j = 0; j < d.length; j++) {
+                x++;
+                DescriptionInfoItem d2 = d[j];
+                ServerAccess.logOutputReprint(x + ": " + i + "x" + j + " " + d1.toString() + "x" + d2.toString() + "- same  - " + d1.isSame(d2));
+                Assert.assertEquals(results[x], d1.isSame(d2));
+            }
+
+        }
+
+    }
+
+    @Test
+    public void equalsTest() {
+        boolean[] results = new boolean[]{true, false, false, false, false, false, true, false, false, false, false, false, true, false, false, false, false, false, true, false, false, false, false, false, true
+        };
+        int x = -1;
+        for (int i = 0; i < d.length; i++) {
+            DescriptionInfoItem d1 = d[i];
+            for (int j = 0; j < d.length; j++) {
+                x++;
+                DescriptionInfoItem d2 = d[j];
+                ServerAccess.logOutputReprint(x + ": " + i + "x" + j + ", " + d1.toString() + " x " + d2.toString() + "- equals  - " + d1.equals(d2));
+                Assert.assertEquals(results[x], d1.equals(d2));
+            }
+
+        }
+
+
+    }
+
+    @Test
+    public void toStringTest() {
+        DescriptionInfoItem d1 = new DescriptionInfoItem("Firm 3", null);
+        Assert.assertTrue(d1.toString().contains(d1.getValue()));
+        Assert.assertTrue(d1.toString().contains(d1.getType()));
+        Assert.assertTrue(d1.toString().contains("null"));
+        DescriptionInfoItem dd = new DescriptionInfoItem("Firm 3", "k1");
+        Assert.assertTrue(dd.toString().contains(dd.getValue()));
+        Assert.assertTrue(dd.toString().contains(dd.getType()));
+        Assert.assertTrue(dd.toString().contains(dd.getKind()));
+
+    }
+
+    @Test
+    public void toNiceStringTest() {
+        DescriptionInfoItem d1 = new DescriptionInfoItem("Firm 3", null);
+        Assert.assertTrue(d1.toNiceString().contains(d1.getValue()));
+        Assert.assertTrue(d1.toNiceString().contains(InfoItem.SPLASH + d1.getType()) || !d1.toNiceString().contains(InfoItem.SPLASH));
+        DescriptionInfoItem dd = new DescriptionInfoItem("Firm 3", "k1");
+        Assert.assertTrue(dd.toNiceString().contains(dd.getValue()));
+        Assert.assertTrue(dd.toNiceString().contains(InfoItem.SPLASH + dd.getType()) || !d1.toNiceString().contains(InfoItem.SPLASH));
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InfoItemTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InfoItemTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,120 @@
+/* InfoItemTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ *The optional kind="splash" attribute may be used in an icon element to indicate that the image is to be used as a "splash" screen during the launch of an application. If the JNLP file does not contain an icon element with kind="splash" attribute, Java Web Start will construct a splash screen using other items from the information Element.
+ *If the JNLP file does not contain any icon images, the splash image will consist of the application's title and vendor, as taken from the JNLP file.
+ *
+ * items not used inside
+ */
+public class InfoItemTest {
+
+    @Test
+    public void testGettersSetters() {
+        InfoItem ii = new InfoItem("a", "b");
+        Assert.assertEquals("a", ii.getType());
+        Assert.assertEquals("b", ii.getValue());
+        ii.setType("c");
+        Assert.assertEquals("c", ii.getType());
+        ii.setValue("d");
+        Assert.assertEquals("d", ii.getValue());
+
+    }
+
+    @Test
+    public void TestIsOfSameType() {
+        InfoItem i1 = new InfoItem("a", "b");
+        InfoItem i2 = new InfoItem("a", "c");
+        InfoItem i3 = new InfoItem("b", "a");
+        Assert.assertTrue(i1.isofSameType(i2));
+        Assert.assertFalse(i1.isofSameType(i3));
+        Assert.assertFalse(i2.isofSameType(i3));
+
+        DescriptionInfoItem d1 = new DescriptionInfoItem("a", InfoItem.descriptionKindToolTip);
+        InfoItem id1 = new InfoItem(InfoItem.description, "a");
+        Assert.assertTrue(id1.isofSameType(d1));
+
+    }
+
+    @Test
+    public void testEquals() {
+        InfoItem i1 = new InfoItem("a", "b");
+        InfoItem i11 = new InfoItem("a", "b");
+        InfoItem i2 = new InfoItem("a", "c");
+        InfoItem i3 = new InfoItem("b", "a");
+        Assert.assertFalse(i1.equals(i2));
+        Assert.assertFalse(i1.equals(i3));
+        Assert.assertFalse(i2.equals(i3));
+        Assert.assertTrue(i1.equals(i11));
+        DescriptionInfoItem d1 = new DescriptionInfoItem("a", InfoItem.descriptionKindToolTip);
+        InfoItem id1 = new InfoItem(InfoItem.description, "a");
+        Assert.assertTrue(id1.equals(d1));
+
+
+    }
+
+    @Test
+    public void toStringTest() {
+        InfoItem i1 = new InfoItem("aa", "bb");
+        Assert.assertTrue(i1.toString().contains("aa"));
+        Assert.assertTrue(i1.toString().contains("bb"));
+        Assert.assertTrue(i1.toString().length() > 4);
+
+    }
+
+    @Test
+    public void toNiceString() {
+        InfoItem i1 = new InfoItem("aaa", "bbb");
+        Assert.assertTrue(i1.toNiceString().contains(InfoItem.SPLASH + "aaa") || !i1.toNiceString().contains(InfoItem.SPLASH));
+        Assert.assertTrue(i1.toNiceString().contains("bbb"));
+        Assert.assertFalse(i1.toNiceString().equals(i1.toString()));
+    }
+
+    @Test
+    public void toXml() {
+        InfoItem i1 = new InfoItem("aa", "bb");
+        Assert.assertTrue(i1.toXml().contains("aa"));
+        Assert.assertTrue(i1.toXml().contains("bb"));
+        Assert.assertTrue(i1.toXml().length() > 4);
+        JEditorPaneBasedExceptionDialogTest.assertMarkup(i1.toXml());
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InformationElementTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InformationElementTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,241 @@
+/* InformationElementTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+/**
+http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html
+ */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.io.ByteArrayInputStream;
+import java.io.UnsupportedEncodingException;
+import net.sourceforge.jnlp.JNLPFile;
+import net.sourceforge.jnlp.ParseException;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ *
+ */
+public class InformationElementTest {
+
+    private final static InfoItem title = new InfoItem(InfoItem.title, "title exp");
+    private final static InfoItem vendor = new InfoItem(InfoItem.vendor, "vendor exp");
+    private final static InfoItem homepage = new InfoItem(InfoItem.homepage, "http://homepage.exp");
+    private final static DescriptionInfoItem oneLineD = new DescriptionInfoItem("One Line", DescriptionInfoItem.descriptionKindOneLine);
+    private final static DescriptionInfoItem toolTipD = new DescriptionInfoItem("Tooltip", DescriptionInfoItem.descriptionKindToolTip);
+    private final static DescriptionInfoItem short1D = new DescriptionInfoItem("short1", DescriptionInfoItem.descriptionKindShort);
+    private final static DescriptionInfoItem short2D = new DescriptionInfoItem("short2", DescriptionInfoItem.descriptionKindShort);
+    private final static DescriptionInfoItem noKindD = new DescriptionInfoItem("noKind", null);
+    private static final String testJnlpheader =
+            "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+            + "<jnlp spec=\"1.0\" href=\"http://somehref.jnlp\" codebase=\"http://some.code.base\">\n"
+            + "  <information>\n";
+    private static final String testJnlpFooter = "    <offline/>\n"
+            + "  </information>\n"
+            + "  <resources>\n"
+            + "    <j2se version=\"1.6+\"/>\n"
+            + "    <jar href=\"somejar\"/>\n"
+            + "  </resources>\n"
+            + "  <application-desc main-class=\"someMainClass\">\n"
+            + "  </application-desc>\n"
+            + "</jnlp>";
+
+    @Test
+    public void testSetGetTitle() {
+
+        InformationElement ie = new InformationElement();
+        Assert.assertNull("After creation value must be null", ie.getTitle());
+        ie.setTitle(title.getValue());
+        Assert.assertNotNull("After assigmentvalue must NOT be null", ie.getTitle());
+        Assert.assertTrue("After assigment value must be included in output", ie.getTitle().contains(title.getValue()));
+    }
+
+    @Test
+    public void testSetGetvendor() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNull("After creation value must be null", ie.getVendor());
+        ie.setvendor(vendor.getValue());
+        Assert.assertNotNull("After assigmentvalue must NOT be null", ie.getVendor());
+        Assert.assertTrue("After assigment value must be included in output", ie.getVendor().contains(vendor.getValue()));
+    }
+
+    @Test
+    public void testSetGetHomepage() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNull("After creation value must be null", ie.getHomepage());
+        ie.setHomepage(homepage.getValue());
+        Assert.assertNotNull("After assigmentvalue must NOT be null", ie.getHomepage());
+        Assert.assertTrue("After assigment value must be included in output", ie.getHomepage().contains(homepage.getValue()));
+    }
+
+    @Test
+    public void addDescriptionTest() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should be empty", 0, ie.getDescriptions().size());
+        ie.addDescription(toolTipD.getValue(), toolTipD.getKind());
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should be empty", 1, ie.getDescriptions().size());
+        ie.addDescription(short1D.getValue(), short1D.getKind());
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should be empty", 2, ie.getDescriptions().size());
+        ie.addDescription(short2D.getValue(), short2D.getKind());
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should reamin same", 2, ie.getDescriptions().size());
+        ie.addDescription(oneLineD.getValue(), oneLineD.getKind());
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should be ", 3, ie.getDescriptions().size());
+        ie.addDescription(noKindD.getValue(), noKindD.getKind());
+        Assert.assertNotNull("Descriptions should never be null", ie.getDescriptions());
+        Assert.assertEquals("Descriptions should be ", 4, ie.getDescriptions().size());
+
+
+    }
+
+    public void getBestMatchingDescriptionForSplashTest() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNull(ie.getBestMatchingDescriptionForSplash());
+        ie.addDescription(toolTipD.getValue(), toolTipD.getKind());
+        Assert.assertNull(ie.getBestMatchingDescriptionForSplash());
+        ie.addDescription(short1D.getValue(), short1D.getKind());
+        Assert.assertNull(ie.getBestMatchingDescriptionForSplash());
+        ie.addDescription(noKindD.getValue(), noKindD.getKind());
+        Assert.assertNotNull(ie.getBestMatchingDescriptionForSplash());
+        Assert.assertEquals(ie.getBestMatchingDescriptionForSplash().getValue(), (noKindD.getValue()));
+        ie.addDescription(oneLineD.getValue(), oneLineD.getKind());
+        Assert.assertNotNull(ie.getBestMatchingDescriptionForSplash());
+        Assert.assertEquals(ie.getBestMatchingDescriptionForSplash().getValue(), (oneLineD.getValue()));
+        ie.addDescription(short2D.getValue(), short2D.getKind());
+        Assert.assertNotNull(ie.getBestMatchingDescriptionForSplash());
+        Assert.assertEquals(ie.getBestMatchingDescriptionForSplash().getValue(), (oneLineD.getValue()));
+
+
+    }
+
+    public void getLongestDescriptionForSplashTest() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNull(ie.getLongestDescriptionForSplash());
+        ie.addDescription(toolTipD.getValue(), toolTipD.getKind());
+        Assert.assertNotNull(ie.getLongestDescriptionForSplash());
+        Assert.assertEquals(ie.getLongestDescriptionForSplash().getValue(), (toolTipD.getValue()));
+        ie.addDescription(oneLineD.getValue(), oneLineD.getKind());
+        Assert.assertNotNull(ie.getLongestDescriptionForSplash());
+        Assert.assertEquals(ie.getLongestDescriptionForSplash().getValue(), (oneLineD.getValue()));
+        ie.addDescription(noKindD.getValue(), noKindD.getKind());
+        ie.addDescription(oneLineD.getValue(), oneLineD.getKind());//disturb
+        Assert.assertNotNull(ie.getLongestDescriptionForSplash());
+        Assert.assertEquals(ie.getLongestDescriptionForSplash().getValue(), (noKindD.getValue()));
+        ie.addDescription(short1D.getValue(), short1D.getKind());
+        ie.addDescription(toolTipD.getValue(), toolTipD.getKind());//disturb
+        Assert.assertNotNull(ie.getLongestDescriptionForSplash());
+        Assert.assertEquals(ie.getLongestDescriptionForSplash().getValue(), (short1D.getValue()));
+
+    }
+
+    @Test
+    public void getDescriptionTest() {
+        getBestMatchingDescriptionForSplashTest();
+
+    }
+
+    @Test
+    public void getHeaderTest() {
+        InformationElement ie = new InformationElement();
+        Assert.assertNotNull("Header should never be null", ie.getHeader());
+        Assert.assertEquals(0, ie.getHeader().size());
+        ie.setvendor(vendor.getValue());
+        Assert.assertEquals(1, ie.getHeader().size());
+        ie.setTitle(title.getValue());
+        Assert.assertEquals(2, ie.getHeader().size());
+        ie.setHomepage(homepage.getValue());
+        Assert.assertEquals(3, ie.getHeader().size());
+        ie.setTitle(homepage.getValue());
+        Assert.assertEquals(3, ie.getHeader().size());
+        ie.addDescription(toolTipD.getValue());
+        Assert.assertEquals(3, ie.getHeader().size());
+        ie.addDescription(oneLineD.getValue());
+        Assert.assertEquals(3, ie.getHeader().size());
+    }
+
+    @Test
+    public void createFromJNLP() throws UnsupportedEncodingException, ParseException {
+        JNLPFile jnlpFile0 = null;
+        InformationElement ie0 = InformationElement.createFromJNLP(jnlpFile0);
+        Assert.assertNull(ie0);
+        String exJnlp1 = "<jnlp>this is invalid jnlp<jnlp>";
+        Exception ex = null;
+        JNLPFile jnlpFile1 = null;
+        try {
+            jnlpFile1 = new JNLPFile(new ByteArrayInputStream(exJnlp1.getBytes("utf-8")), true);
+        } catch (Exception eex) {
+            ex = eex;
+        }
+        Assert.assertNotNull(ex);
+        InformationElement ie1 = InformationElement.createFromJNLP(jnlpFile1);
+        Assert.assertNull(ie1);
+
+        //title, vendor and homepage are obligatory.. not so much to test
+        String exJnlp2 = testJnlpheader + title.toXml() + "\n" + homepage.toXml() + "\n" + vendor.toXml() + "\n" + testJnlpFooter;
+        JNLPFile jnlpFile2 = new JNLPFile(new ByteArrayInputStream(exJnlp2.getBytes("utf-8")), true);
+        InformationElement ie2 = InformationElement.createFromJNLP(jnlpFile2);
+        Assert.assertNotNull(ie2);
+        Assert.assertEquals(3, ie2.getHeader().size());
+        Assert.assertEquals(0, ie2.getDescriptions().size());
+
+        String exJnlp3 = testJnlpheader + title.toXml() + "\n" + homepage.toXml() + "\n" + vendor.toXml() + "\n" + toolTipD.toXml() + "\n" + testJnlpFooter;
+        JNLPFile jnlpFile3 = new JNLPFile(new ByteArrayInputStream(exJnlp3.getBytes("utf-8")), true);
+        InformationElement ie3 = InformationElement.createFromJNLP(jnlpFile3);
+        Assert.assertNotNull(ie3);
+        Assert.assertEquals(3, ie3.getHeader().size());
+        Assert.assertEquals(1, ie3.getDescriptions().size());
+
+        String exJnlp4 = testJnlpheader + title.toXml() + "\n" + homepage.toXml() + "\n" + vendor.toXml() + "\n" + noKindD.toXml() + "\n" + testJnlpFooter;
+        JNLPFile jnlpFile4 = new JNLPFile(new ByteArrayInputStream(exJnlp4.getBytes("utf-8")), true);
+        InformationElement ie4 = InformationElement.createFromJNLP(jnlpFile4);
+        Assert.assertNotNull(ie4);
+        Assert.assertEquals(3, ie4.getHeader().size());
+        Assert.assertEquals(1, ie4.getDescriptions().size());
+
+        String exJnlp5 = testJnlpheader + title.toXml() + "\n" + homepage.toXml() + "\n" + vendor.toXml() + "\n" + noKindD.toXml() + "\n" + toolTipD.toXml() + "\n" + testJnlpFooter;
+        JNLPFile jnlpFile5 = new JNLPFile(new ByteArrayInputStream(exJnlp5.getBytes("utf-8")), true);
+        InformationElement ie5 = InformationElement.createFromJNLP(jnlpFile5);
+        Assert.assertNotNull(ie5);
+        Assert.assertEquals(3, ie5.getHeader().size());
+        Assert.assertEquals(2, ie5.getDescriptions().size());
+
+
+    }
+}
diff -r 01544fb82384 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialogTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialogTest.java	Wed Aug 01 13:25:15 2012 +0200
@@ -0,0 +1,190 @@
+/* JeditorPaneBasedExceptionDialog.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen.parts;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import net.sourceforge.jnlp.runtime.Translator;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class JEditorPaneBasedExceptionDialogTest {
+
+    private static RuntimeException eex = new RuntimeException("ex2");
+    private static Exception ex = new Exception("ex1", eex);
+    private static String ai = "Another info";
+    private static InformationElement ec = new InformationElement();
+    private static List<String> l = new ArrayList<String>(3);
+
+    @BeforeClass
+    public static void fillLists() {
+        ec.setHomepage("item 1");
+        ec.setTitle("item 2");
+        ec.setvendor("item 3");
+        ec.addDescription("item 4");
+        l = JEditorPaneBasedExceptionDialog.infoElementToList(ec);
+
+    }
+
+    static void assertHtml(String s) {
+        Assert.assertTrue("result of getText must be marked html", s.contains("html"));
+        Assert.assertTrue("result of getText must be marked html", s.contains("body"));
+        assertMarkup(s);
+    }
+
+    static void assertMarkup(String s) {
+        Assert.assertTrue("result of getText must be marked in by  html markup", s.contains("<") && s.contains(">"));
+        Assert.assertTrue("result of getText must be marked in by  html markup", s.contains("</") || s.contains("/>"));
+    }
+
+    private void assertAI(String s, boolean b) {
+        if (b) {
+            Assert.assertTrue("result of getText must contains annother info", s.contains(ai));
+        } else {
+            Assert.assertFalse("result of getText must NOT contains annother info", s.contains(ai));
+        }
+    }
+
+    private void assertLL(String s, boolean b) {
+        for (String i : l) {
+
+            if (b) {
+                Assert.assertTrue("result of getText must contains  info list", s.contains(i));
+            } else {
+                Assert.assertFalse("result of getText must NOT contains info list", s.contains(i));
+            }
+        }
+    }
+
+    private void assertFullException(String s, boolean b) {
+        if (b) {
+            Assert.assertTrue("result of getText must contains  complete exception", s.contains(ex.getMessage()));
+            Assert.assertTrue("result of getText must contains  complete exception", s.contains(eex.getMessage()));
+        } else {
+            Assert.assertFalse("result of getText must contains not  complete exception", s.contains(ex.getMessage()));
+            Assert.assertFalse("result of getText must contains  not complete exception", s.contains(eex.getMessage()));
+
+        }
+    }
+
+    @Test
+    public void getTextTest() {
+        String s1 = JEditorPaneBasedExceptionDialog.getText(ex, l, ai);
+        String s2 = JEditorPaneBasedExceptionDialog.getText(ex, l, null);
+        String s3 = JEditorPaneBasedExceptionDialog.getText(ex, null, ai);
+        String s4 = JEditorPaneBasedExceptionDialog.getText(null, l, ai);
+        assertHtml(s1);
+        assertHtml(s2);
+        assertHtml(s3);
+        assertHtml(s4);
+        assertAI(s1, true);
+        assertAI(s2, false);
+        assertAI(s3, true);
+        assertAI(s4, true);
+        assertLL(s1, true);
+        assertLL(s2, true);
+        assertLL(s3, false);
+        assertLL(s4, true);
+        assertFullException(s1, true);
+        assertFullException(s2, true);
+        assertFullException(s3, true);
+        assertFullException(s4, false);
+        JEditorPaneBasedExceptionDialog d1 = new JEditorPaneBasedExceptionDialog(null, false, ex, ec, ai);
+        JEditorPaneBasedExceptionDialog d2 = new JEditorPaneBasedExceptionDialog(null, false, ex, ec, null);
+        JEditorPaneBasedExceptionDialog d3 = new JEditorPaneBasedExceptionDialog(null, false, ex, null, ai);
+        JEditorPaneBasedExceptionDialog d4 = new JEditorPaneBasedExceptionDialog(null, false, null, ec, ai);
+        Assert.assertTrue("message from dialog mus be same as pattern", d1.getMessage().equals(s1));
+        Assert.assertTrue("message from dialog mus be same as pattern", d2.getMessage().equals(s2));
+        Assert.assertTrue("message from dialog mus be same as pattern", d3.getMessage().equals(s3));
+        Assert.assertTrue("message from dialog mus be same as pattern", d4.getMessage().equals(s4));
+
+    }
+
+    @Test
+    public void getExceptionStackTraceAsString() {
+        String t1 = JEditorPaneBasedExceptionDialog.getExceptionStackTraceAsString(ex);
+        assertFullException(t1, true);
+        String t2 = JEditorPaneBasedExceptionDialog.getExceptionStackTraceAsString(null);
+        Assert.assertNotNull("For null empty result must not be null", t2);
+        Assert.assertEquals("null input must result to empty string", "", t2);
+    }
+
+    @Test
+    public void getExceptionStackTraceAsStrings() {
+        String[] t1 = JEditorPaneBasedExceptionDialog.getExceptionStackTraceAsStrings(ex);
+        assertFullException(Arrays.toString(t1), true);
+        String[] t2 = JEditorPaneBasedExceptionDialog.getExceptionStackTraceAsStrings(null);
+        Assert.assertNotNull("For null empty result must not be null", t2);
+        Assert.assertArrayEquals("null input must result to empty array", new String[0], t2);
+    }
+
+    @Test
+    public void formatListInfoList() {
+        String t1 = JEditorPaneBasedExceptionDialog.formatListInfoList(l);
+        assertMarkup(t1);
+        assertLL(t1, true);
+        String t2 = JEditorPaneBasedExceptionDialog.formatInfo(null);
+        Assert.assertNotNull("For null empty result must not be null", t2);
+        Assert.assertEquals("null input must result to empty string", "", t2);
+    }
+
+    @Test
+    public void formatInfo() {
+        String s = "SOME STRING";
+        String t1 = JEditorPaneBasedExceptionDialog.formatInfo(s);
+        assertMarkup(t1);
+        Assert.assertTrue("Marked text must contains source", t1.contains(s));
+        String t2 = JEditorPaneBasedExceptionDialog.formatInfo(null);
+        Assert.assertNotNull("For null empty result must not be null", t2);
+        Assert.assertEquals("null input must result to empty string", "", t2);
+
+    }
+
+    @Test
+    public void infoElementToListTets() {
+
+        List<String> tl = JEditorPaneBasedExceptionDialog.infoElementToList(ec);
+        Assert.assertTrue("Transformed elemetn must contains all items ", tl.contains(l.get(0)));
+        Assert.assertTrue("Transformed elemetn must contains all items ", tl.contains(l.get(1)));
+        Assert.assertTrue("Transformed elemetn must contains all items ", tl.contains(l.get(2)));
+        Assert.assertTrue("Transformed elemetn must contains all items ", tl.contains(l.get(3)));
+    }
+}
diff -r 01544fb82384 tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java
--- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java	Wed Jul 11 16:18:58 2012 +0200
+++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java	Wed Aug 01 13:25:15 2012 +0200
@@ -54,9 +54,7 @@
 import java.net.ServerSocket;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 import net.sourceforge.jnlp.browsertesting.Browser;
 import net.sourceforge.jnlp.browsertesting.BrowserFactory;
 import net.sourceforge.jnlp.browsertesting.Browsers;


More information about the distro-pkg-dev mailing list