2 messages in net.java.dev.jna.users[jna-users] JNA - java.lang.IllegalAr...
FromSent OnAttachments
Peach WyssApr 14, 2009 3:46 am 
Timothy WallApr 14, 2009 4:01 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[jna-users] JNA - java.lang.IllegalArgumentException: Component must be heavyweightActions...
From:Peach Wyss (peac@yahoo.com)
Date:Apr 14, 2009 3:46:41 am
List:net.java.dev.jna.users

Hello

I've tried to use jna (inside jVLC -> java bindings for the vlc player) with a
jpanel:

public void setVideoOutput(JPanel jpanel) { long drawable = Native.getComponentID(jpanel); libvlc_exception_t exception = new libvlc_exception_t(); libvlc.libvlc_video_set_parent(instance, drawable, exception ); }

Then I get the following error: Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException:
Component must be heavyweight at com.sun.jna.Native.getComponentID(Native.java:156)

I had problems using the heavyweight canvas object inside my sun's wonderland
embeddedswing application, so I tried it with a lightweight jpanel instead of a
canvas object. Is it not possible to use JNA with a lightweight component such
as a jpanel?

Thanks for your help. Peter