Slave mode bugs (?) and Java Swing embedding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



I was referring to a non-platform specific solution.  You can get a
Swing Canvas window handle with 100% java on Windows (but, it is a
"unsupported" hack).

  public static long getHandle(final Canvas c) {
    try {
      final Class<?> cl = Class.forName("sun.awt.windows.WComponentPeer");
      java.lang.reflect.Field f = cl.getDeclaredField("hwnd");
      f.setAccessible(true);
      return f.getLong(c.getPeer());
    } catch (Exception e) {
      LOG.error("Caught Exception [" + e.getMessage() + "]");
    }
    return -1;
  }

Also, sorry I forgot the -wid option does work with X11.  I was
thinking about when I was trying to get it to work under OS X (macosx
vo is not supported).  My bad

-- 
Alexander Sherwin
alex.sherwin at gmail.com


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux