Re: [Java-gnome-developer] multiple windows
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2005-10-31 00:35:09
|
On Sun, 2005-30-10 at 19:31 +0100, Daniel Gutierrez wrote: > tell to glade which window must be focused when the program starts This may not be exactly what you want, but calling Window.present() may do the trick: >From the JavaDoc: Presents a window to the user. This may mean raising the window in the stack order, deiconifying it, moving it to the current desktop, and/or giving it the keyboard focus, possibly dependent on the user's platform, window manager, and preferences. If the Window is hidden it will also call show as well. [that's org.gnu.gtk.Window, not org.gnu.gdk.Window]. With any Widget w, I tend to call Window top = w.getToplevel(); top.present(); When using Glade, I usually have Window _top as a class instance variable that I populate as soon as I get my Glade file open, LibGlade glade = new LibGlade("file.glade", this); _top = (Window) glade.getWidget("my_window_name"); ... _top.present(); so that I always have it around. I find I need it a lot. AfC Toronto -- Andrew Frederick Cowie Technology strategy, managing change, establishing procedures, and executing successful upgrades to mission critical business infrastructure. http://www.operationaldynamics.com/ Sydney New York Toronto London |