Menu

#12 JWebBrowser is not displayed if maximized the applet

v1.0_(example)
open
nobody
None
1
2014-01-22
2012-12-10
Lalitha
No

Hi Christopher,
I am using a Jide framework where in a Dockable frame I am initializing JWebBrowser. When I run the application as standalone client then the browser is working fine. When I tried to execute as a applet then also the browser is working fine but when I maximize or minimize the applet then the browser is not shown.
Java version: 1.6.0_26
JWebbrowser : 1.0.2
Please help me

Discussion

  • Christopher Deckers

    Hi,

    In your applet's JNLP, did you set the system property:
    sun.awt.disableMixing=true

    Hope this helps,
    -Christopher

     
    • Lalitha

      Lalitha - 2012-12-10

      Hi,

      No. I din't set the property.
      Help me with how to set the property and where to set.

       
  • Christopher Deckers

    You have to create a JNLP file for your applet if it is not already declared using a JNLP. Here is some info:
    http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#example

    -Christopher

     
    • Lalitha

      Lalitha - 2013-01-02

      Hi,

      I tried creating a JNLP file as shown below and referred this jnlp in the applet html like : param name="jnlp_href" value="demo.jnlp"

      Result: Webbrowser not displaying anything on maximizing the applet. Please help me to resolve this.

      demo.jnlp

      jnlp spec="6.0+" codebase="http://my_company.com/jaws/apps" href="demo.jnlp">
      information>
      title>Applet
      vendor>Proxim</vendor>
      homepage href="pvnms.html"/>
      description>SwingSet2 Demo Application</description>
      description kind="short">A demo of the capabilities
      of the Swing Graphical User Interface.</description>
      /information>

      security>
      all-permissions/>
      /security>
      resources>
      j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
      property name="jnlp.packEnabled" value="true"/>
      property name="sun.awt.disableMixing" value="true"/>
      jar href="client/DJNativeSwing-SWT.jar"/>
      jar href="client/DJNativeSwing.jar"/>
      jar href="client/swt-3.7M5-win32-win32-x86.jar"/>
      jar href="client/jna_WindowUtils.jar"/>
      jar href="client/jna-3.2.4.jar"/>
      /resources>
      application-desc name="applet" main-class="com.DemoApplet" width="100" height="100">/application-desc>

      Error :

      Under WebStart on Java >= 1.6.0_18, the value of the "sun.awt.disableMixing" system property needs to be defined in the JNLP descriptor with value "true" (or "false" if you really want the default behavior). When not set to "true", the content of the native components may not be displayed.

       

      Last edit: Lalitha 2013-01-02
  • Christopher Deckers

    Hi,

    I am not sure what is wrong. You seem to have defined the "sun.awt.disableMixing" property correctly but you get that error message.

    What is the OS and version of Java that you tried? Also, have you made sure that the JNLP defined as the codebase is really up to date and there is no cache issue?

    -Christopher

     
    • Lalitha

      Lalitha - 2013-01-04

      Hi

      Java : 1.6.0_35
      OS : Windows 7

      Thanks for your valuable suggestions
      Problem got resolved
      Instead of adding jnlp, I added a static block in the applet class to enable "sun.awt.disableMixing" property

       
  • Christopher Deckers

    Hi,

    Setting the value in a static block fools my detection algorithm into thinking that the setting was properly set while in fact it is not. The only way to have it set is defining it in the JNLP. So, it seems to work but the lightweight/heavyweight mixing feature may not work.

    -Christopher

     
  • Peter Andrews

    Peter Andrews - 2014-01-22

    I had the same problem -- I still got the warning 'Under WebStart on Java >= 1.6.0_18, the value of the "sun.awt.disableMixing" ...' even though I had defined the property in the jnlp.

    I got around this by setting it as an arg to the jvm:

    <resources>
        <j2se version="1.5+" java-vm-args="-Dsun.awt.disableMixing=true"/>
        <jar href="bioSimEvolutionaryWrapper.jar" />
    </resources>
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.