Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Commit

Permalink
Fix for IZPACK-857 ResourceNotFoundException: Image icon resource not…
Browse files Browse the repository at this point in the history
… found in flag.English
  • Loading branch information
unb committed Sep 14, 2012
1 parent 478ada7 commit 72e5ede
Show file tree
Hide file tree
Showing 6 changed files with 580 additions and 353 deletions.
3 changes: 2 additions & 1 deletion izpack-dist/src/main/izpack/install.xml
Expand Up @@ -24,7 +24,8 @@

<!-- Flexible and in the screen proportions -->
<guiprefs height="700" resizable="yes" width="870">
<!-- GUI adaption for more informations see "Modifying the GUI" in the documentation -->
<!-- GUI adaption for more information see "Modifying the GUI" in the documentation -->
<modifier key="langDisplayType" value="default"/>
<modifier key="layoutAnchor" value="CENTER"/>
<modifier key="headingPanelCounter" value="progressbar"/>
<modifier key="headingPanelCounterPos" value="inNavigationPanel"/>
Expand Down
Expand Up @@ -2,6 +2,7 @@

import javax.swing.SwingUtilities;

import com.izforge.izpack.api.exception.IzPackException;
import com.izforge.izpack.installer.base.InstallDataConfiguratorWithRules;

/**
Expand All @@ -25,43 +26,53 @@ public InstallerController(InstallDataConfiguratorWithRules installDataRulesEngi

public InstallerController buildInstallation()
{
try

run(new Runnable()
{
SwingUtilities.invokeAndWait(new Runnable()
@Override
public void run()
{
@Override
public void run()
{
installerFrame.buildGUI();
installerFrame.sizeFrame();
}
});
}
catch (Exception exception)
{
throw new IllegalStateException(exception);
}
installerFrame.buildGUI();
installerFrame.sizeFrame();
}
});
return this;
}

public void launchInstallation()
{
try
run(new Runnable()
{
SwingUtilities.invokeAndWait(new Runnable()
@Override
public void run()
{
@Override
public void run()
{
installerFrame.setVisible(true);
installerFrame.navigateNext();
}
});
installerFrame.setVisible(true);
installerFrame.navigateNext();
}
});
}

/**
* Runs a {@code Runnable} inside the event dispatch thread.
*
* @param action the action to run
*/
private void run(Runnable action)
{
if (SwingUtilities.isEventDispatchThread())
{
action.run();
}
catch (Exception exception)
else
{
throw new IllegalStateException(exception);
try
{
SwingUtilities.invokeAndWait(action);
}
catch (Exception exception)
{
throw new IzPackException(exception);
}
}
}

}

0 comments on commit 72e5ede

Please sign in to comment.