[java] Using a Windows GDI function and Java

Started by
1 comment, last by Ro 23 years, 11 months ago
I have a library that was built for outputing to the Windows GDI. I was wondering if it''s at all possible for redirecting the graphics output to a Java frame? Thanks for any help!
Advertisement
I''m guessing you are the type of person that likes challenges...

This is a little out of my league, but I did run across the fact that Sun''s newly released 1.3 SDK has new C headers to allow native code to access AWT components. I suppose this includes the Frame component. You might be able to write something that would intercept the calls from the graphics library and translate them into the neccesary instructions to render to the Frame (an ''Adapter'' pattern construct).

Even if it''s ''possible'' this doesn''t seem very ''feasible'' = (

Yup, doesn''t sound too feasible. You didn''t say in you message, but do you have some specific reason for doing this "render to java.awt.Frame" thing? Why don''t you just use JNI (Java Native Interface) to interface your Java code to your native code library. That way you can have the library code as it is and just use it from the Java side.
-Pasi Keranen

This topic is closed to new replies.

Advertisement