Menu

#64 Java swing fail to work after the window minimized on mac os x 10.7.5

v1.0_(example)
open
nobody
None
1
2012-11-03
2012-10-30
ritter
No

Hi
I try to run the demo "SimpleWebBrowserExample.java" on my mac os 10.7.5, I have imported the jars: SWT for mac, DJNativeSwing, DJNativeSwing-SWT, jna, and the demo can run successfully, but after I click on the minimize button, the demo iconified, then I click the icon to make it return, some swing component just can't work!!! I can't input address into the address bar or click the 'go' button.
Is there anybody knows how to fix this bug?

Discussion

  • Christopher Deckers

    Hi,

    Which version of Java are you using? Which version of DJ Native Swing and which version of SWT?

    Cheers,
    -Christopher

     
    • ritter

      ritter - 2012-10-31

      Hi,

      $ java -version
      java version "1.6.0_37"
      Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11G63)
      Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)

      DJ Native Swing:
      Both DJNativeSwing-SWT-1-0-2-20120308 and DJNativeSwing-SWT-1-0-2-20121008 have these bug.

      SWT:
      I have tried swt-3.8.1-cocoa-macosx-x86_64, swt-4.3M2-cocoa-macosx-x86_64 and swt-4.2.1-cocoa-macosx-x86_64, all of them have this bug.

      BTW:
      Maybe it is the SWT which lead this bug, because with same demo, only SWT different, there is no this bug on Ubuntu.

      Thank you for your reply and awesome job. :P

      Sorry for forget press the reply button.

       
    • ritter

      ritter - 2012-11-01

      Hi,

      I find that if I move the main() method into the AWT class:

      public MyFrame extends JFrame
      {
      public MyFrame();

      ....

      public static void main(String args[])
      {
      }
      

      }

      Although there is some warning, it can still run successfully, and with '-XstartOnFirstThread' VM option, the minimize bug no longer exist.

      I don't know why...but just casually try it out.

       
  • ritter

    ritter - 2012-10-31

    Hi,

    $ java -version
    java version "1.6.0_37"
    Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11G63)
    Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)

    DJ Native Swing:
    Both DJNativeSwing-SWT-1-0-2-20120308 and DJNativeSwing-SWT-1-0-2-20121008 have these bug.

    SWT:
    I have tried swt-3.8.1-cocoa-macosx-x86_64, swt-4.3M2-cocoa-macosx-x86_64 and swt-4.2.1-cocoa-macosx-x86_64, all of them have this bug.

    BTW:
    Maybe it is the SWT which lead this bug, because with same demo, only SWT different, there is no this bug on Ubuntu.

    Thank you for your reply and awesome job. :P

     
  • Christopher Deckers

    I find that if I move the main() method into the AWT class

    It took me long to find what I wanted, but eventually here is the relevant comments from the SWT developers:
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=291705#c3
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=291705#c6

    The problem here is that this is likely to be an SWT issue, and because of the new Java 7 work which changes lots of things I don't think they are going to do anything with supporting Java 6. So I think this issue is likely to be fixed when the whole of Java 7 supports embedding SWT (which it does not at the moment).

     
    • ritter

      ritter - 2012-11-05

      Thank you so much!!!

       

Log in to post a comment.

MongoDB Logo MongoDB