-
Enhancement
-
Resolution: Fixed
-
P3
-
fx2.0, fx2.1, 7u6
I think its a really common case to want a applet to fill the whole browser window. This is hard to achieve today using the current packager and templates. I would even go to say that this should be the default for all applets we generate from Netbeans/packager.
Attached is the HTML template that works in Firefox 6, Chrome and IE 8 & 9. It should hopefully work on most other browsers to. You will also need to set the applet size for fx:deploy to 100x100 and include the workaround for now to change "100" to "100%";
<fx:deploy width="100" height="100"
outdir="${basedir}/${dist.dir}" embedJNLP="true"
outfile="${application.title}">
<fx:application refId="ensemble"/>
<template file="${basedir}/web/index_template.html"
tofile="${dist.dir}/index.html"/>
<fx:resources>
<fx:fileset dir="${basedir}/${dist.dir}"
includes="Ensemble.jar"/>
</fx:resources>
<info title="Sample app: ${application.title}"
vendor="${application.vendor}"/>
</fx:deploy>
<!-- Workaround for bug with 100% size in templates -->
<replace dir="${basedir}/${dist.dir}">
<include name="index.html"/>
<replacetoken><![CDATA[: 100,]]></replacetoken>
<replacevalue><![CDATA[: '100%',]]></replacevalue>
</replace>
Attached is the HTML template that works in Firefox 6, Chrome and IE 8 & 9. It should hopefully work on most other browsers to. You will also need to set the applet size for fx:deploy to 100x100 and include the workaround for now to change "100" to "100%";
<fx:deploy width="100" height="100"
outdir="${basedir}/${dist.dir}" embedJNLP="true"
outfile="${application.title}">
<fx:application refId="ensemble"/>
<template file="${basedir}/web/index_template.html"
tofile="${dist.dir}/index.html"/>
<fx:resources>
<fx:fileset dir="${basedir}/${dist.dir}"
includes="Ensemble.jar"/>
</fx:resources>
<info title="Sample app: ${application.title}"
vendor="${application.vendor}"/>
</fx:deploy>
<!-- Workaround for bug with 100% size in templates -->
<replace dir="${basedir}/${dist.dir}">
<include name="index.html"/>
<replacetoken><![CDATA[: 100,]]></replacetoken>
<replacevalue><![CDATA[: '100%',]]></replacevalue>
</replace>
- relates to
-
JDK-8126298 Update Emsemble sample to use embeddedWidth/embeddedHeight
-
- Resolved
-
-
JDK-8092225 javafxpackager -deploy does not accept percentage heights and widths
-
- Resolved
-