From: <ka...@we...> - 2006-01-21 00:21:06
|
Hi Timo, real MDI applications are not possible with gui4j at the moment because there's no support (yet) for JDesktopPane and JInternalFrame. Since gui4j is expandable with respect to its component it would be possible to write support for a, say, <mdiDesktop> element containig <mdiFrame> elements.But that's not that easy without knowing the internals of the framework. It's possible to dynamically set the visibility of each supporrted component. See the "visible" attribute described in the reference documentation under "Common toplevel attributes". For dynamic change of the visible attribute, you'll have to use events (see "Events" and the Expense Records example). The toolbar component support vertical layout and icons. Simply use buttons with icons but no text as the children for a toolbar. There's no concept in gui4j to build truly dynamic layouts. It's not possible to change the physical component layout after the xml description for a window has been read in. For simple dynamic layout changes that you know in advance you could use the cardLayout or switch components. If the layout/content is only known at runtime, the only possibility is to create the complete xml description on-the-fly and open a whole new window using the created xml. For this you'll have to provide your own custom Gui4jResourceProvider and use Gui4j.setResourceProvider. Hope this helps, Kay Timo Meinen wrote: > Hi Kay, > > thank you for your response. Today I made enormous progress with the > gui4j framework. Indeed, the missing line in the > gui4jComponents.properties was the reason why my program didn't start. > > I successfully tried the simpleInternalFrame, too, but it isn't the > right component behaviour I am looking for. I intended to create a > MDI application, but I see it isn't possible with gui4j. Is there > another 'best practice'? Is it possible to set the visibility for > some components? I want to have something like a 'main menu' (perhaps > a vertical toolbar at the left side with icon-buttons), but without > having popups. > > Is it possible to have a region that can load other gui4j-components > dynamically? > > Thank you > Timo > me...@gm... |