• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to get a window handler from/through java

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

I have faced a problem in Java.
An application has written in C. I want to change the GUI of the application to Java. Currently its in VB. I used JNI to link the DLLs of C.
In the GUI, first i created a frame. In the frame, i placed two textfields in North using a panel; i created a panel and simply placed it in Center ; i placed two buttons in South of the Borderlayout using a panel.
In the native side, native method ask a parameter HWND(If we give a HWND of a window to the native method of the application , it automatically draw a picture in the window)
My aim is, if i click a button it interact with a native method in the dll and the method draw a picture in the panel placed in Center of the frame. (ie) the window handle of the panel, so that it can fully draw the picture in the corresponding window handler panel.

My problem is to get the handle of the panel / any awt object placed inside a frame.
I usually check the window handler using the Finder tool in VC++(spy++) which gives a hexadecimal value
kumar
 
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please read this: http://www.javaranch.com/name.html - your account name does not follow our naming guidelines because it contains an underscore.
Also, I am moving this thread to "Java in General (intermediate)"
 
reply
    Bookmark Topic Watch Topic
  • New Topic