Results 1 to 7 of 7
Thread: How do I get all dialogs?
- 03-07-2010, 02:31 AM #1
Member
- Join Date
- Mar 2010
- Posts
- 4
- Rep Power
- 0
- 03-08-2010, 05:43 AM #2
Use Window#getWindows() and iterate over the returned array testing for instanceof Dialog (or JDialog, if this is Swing). Depending on your specific requirements, it might be desirable to first invoke System#gc() to purge the array of Windows which are no longer reachable.
But more important, why do you think you need this? There's probably a better way to do whatever it is you're doing.
db
- 03-08-2010, 03:01 PM #3
Member
- Join Date
- Mar 2010
- Posts
- 4
- Rep Power
- 0
A little problem there;
j2se doesn't have Window.getWindows() :/
I'm trying to get the size and position of a dialog in the java application, Alice, using
jython, which is integrated for scripting in Alice.
Alice is a simple programming tool
for beginners. You can create 3D games and animations with it.
Alice.org if you're intrested.
- 03-08-2010, 05:35 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,386
- Blog Entries
- 7
- Rep Power
- 17
- 03-08-2010, 07:43 PM #5
Member
- Join Date
- Mar 2010
- Posts
- 4
- Rep Power
- 0
Thanks for the replys :)
Still, I get a "class 'java.awt.Window' has no attribute 'getWindows'" error from getWindow(), while
getFrame() work like a charm... :(
- 03-08-2010, 08:33 PM #6
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,386
- Blog Entries
- 7
- Rep Power
- 17
- 03-08-2010, 10:01 PM #7
Member
- Join Date
- Mar 2010
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
Passing data between dialogs
By Wintery in forum New To JavaReplies: 7Last Post: 01-02-2009, 05:35 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks