Hi Kumar,

On Thu, Oct 16, 2003 at 08:52:14AM -0700, Kumar Mettu wrote:
 > Dmitri,
 >
 >  I am trying to figure out screen size (with start x,y) of native
 > applications. The api which provides doesn't have to be part of
 > java.*.* (I am hoping there is way to do this with sun.awt
 > classes).

  Even if there were such api in sun.awt, we'd really discourage you
  from using it, as you're supposed to be using only public apis.
  (what if we change our implementation in sun.awt in the next release,
  your app will break)

  I think you should be able to write some native code using JNI to
  get the list of the windows, and then, probably, look at their
  titles, and then figure out the size of the appropriate window.

  Dmitri


 >
 > Thanks,
 > Kumar.
 >
 > Dmitri Trembovetski <[EMAIL PROTECTED]> wrote:
 > Hi Kumar,
 >
 > I don't believe there's a way to find out the coordinatest of
 > orbitrary native window from Java, but if you have those
 > coordinates somehow, you can use java.awt.Robot class to do the
 > screen capture (see java.awt.Robot.createScreenCapture method).
 >
 > For example, you can make your native app's window maximize and then
 > capture the whole screen.
 >
 > Thank you,
 > Dmitri
 >
 > On Wed, Oct 15, 2003 at 05:56:09PM -0700, Kumar Mettu wrote:
 > >
 > > Hi,
 > >
 > > I am trying to capture current active window screen dimension (this can be
 > > any application like M$ word, Netscape) from a java program running in the
 > > background.
 > >
 > > Is this possible? If so how?
 > >
 > > Basically if M$ word is my current active appliction I need to capture
 > > start x,y and end x,y location of Word window in my java program.
 > >
 > > Thanks,
 > > Kumar.
 > >
 > >
 > >
 > >
 > >
 > > Do you Yahoo!?
 > > The New Yahoo! Shopping - with improved product search
 > >
 > > ===========================================================================
 > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
 > > of the message "signoff JAVA2D-INTEREST". For general help, send email to
 > > [EMAIL PROTECTED] and include in the body of the message "help".
 >
 > ===========================================================================
 > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
 > of the message "signoff JAVA2D-INTEREST". For general help, send email to
 > [EMAIL PROTECTED] and include in the body of the message "help".
 >
 > Do you Yahoo!?
 > The New Yahoo! Shopping - with improved product search

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to