Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making an application "active" from java



I have almost exactly this same issue with my "Parsnips" application. I used Robot to generate a mouse click on the window to activate it.

// Generate a click on the dropWindow to bring the app to the front.
Robot robot = new Robot();
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);


This works because the mouse will be over your app's window when the "drop" occurs.


On Dec 10, 2004, at 8:21 PM, Bill Janssen wrote:

I've got a Java application which supports a drop interface; that is,
you can drag things off the desktop, or from Safari, and drop them on
this application.  When this happens, the application pops up a panel
that describes the dropped object, allows you to correct the
information (via text entry boxes), and then allows you to press a
button to do something to the dragged object.

However, if I drag something from Safari, the panel pops up, but
doesn't get the focus -- that remains on Safari.  Is there some way,
from Java, to make my application the "active" application?

Bill
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


--
Bill Tschumy
Otherwise -- Austin, TX
http://www.otherwise.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Making an application "active" from java (From: Bill Janssen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.