Skip to main content

grab all dialogs,frames dan windows

8 replies [Last post]
vlie84
Offline
Joined: 2003-12-02
Points: 0

hey guys,
i want to get all the info inside all the frames and window and dialogs open by the user.
say theres frame A which have alots of button that will make another window/frame/dialog.(all of these not make using Jinternal frame or Jdekstoppane etc).
at the moment i have a method that will get all the info from frame A only.it cannot get all the information from frame/window/dialog that is being open by the user using the button in frame A.
what i want is to get all the info from all the frame/window/dialog opened by the user.so if user click a button in frame A and make dialog B. then what i want is to get all the info from frame A and dialog B.
is anyone know how to do this??
sorry it is a bit complicated.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
shan-man
Offline
Joined: 2006-02-17
Points: 0

Hi,

vlie84 wrote:
> so are you saying that i just have a class which have
> this method Frame.getFrames() and it will give me all
> the frames that are open at that moment? or it will
> only give me the frame where i attached this method
> to?

Please read the documentation for Frame.getAllFrames() and Window.getOwnedWindows(). They will answer your question.

[url]http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Frame.html#getFrames()[/url]
[url]http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Window.html#getOwnedWindows()[/url]

Shannon

vlie84
Offline
Joined: 2003-12-02
Points: 0

hey cool it work, thank you so much.

vlie84
Offline
Joined: 2003-12-02
Points: 0

basically i want a class/method to grab all the info of window or frame or dialog that open by the user.

eg. user open Mozilla and InternetExplorer, now i want to have a class/method that will allow me to get the info from Mozilla and InternetExplorer.if user then open Netscape, then i want to get the info from Mozilla,IE and Netscape.

i hope this will make it more clearer.

so are you saying that i just have a class which have this method Frame.getFrames() and it will give me all the frames that are open at that moment? or it will only give me the frame where i attached this method to?

thank you

zander
Offline
Joined: 2003-06-13
Points: 0

Are you talking about Java, or JavaScript. If about JavaScript; we can't help you, this forum has is only about Java. (see http://java.sun.com)

If Java; what you ask is not possible.

vlie84
Offline
Joined: 2003-12-02
Points: 0

I'm talking about java,not java script.
the Mozilla,IE or Netscape is just my analogy. in my program those changed with frame/window/dialog.
eg. user open main frame X then user click a button on X that caused frame A open.now, i want to have a class/method that will allow me to get the info from A and X.if user then click a button on A or X that will open frame C, then i want to get the info from A,X and C.
my program has nothing to do with internet stuff.
is this not possible??
so is that means i only can get the value of each frame only?

zander
Offline
Joined: 2003-06-13
Points: 0

To restate;
you want to get information about a window on screen; Probably things like width/height etc.

In Java dialogs and frames are both Window objects, so lets use that word for the problem.

You want to get information about the Window that is active, right?

vlie84
Offline
Joined: 2003-12-02
Points: 0

i want to get info about the Window that is visible

zander
Offline
Joined: 2003-06-13
Points: 0

I cant really follow you, but please look at Frame.GetFrames()

I think that will do what you want.