List for Users of Carlsbad Cubes' Technologies and Products
Mon, 10 Oct 2005 11:02:22 -0700
List for Users of Carlsbad Cubes' Technologies and Products
<Forum@carlsbadcubes.com> schrieb am 10.10.05 17:32:00:
>
> Hi All,
>
> i try to make a little modal dialog. And i notice a magical effect. If i set
> ' modal="true" ' i see nothing in desktoppane. But i leave out this, i can
> see it. Here is the xml-file:
> -------------------------------- snipp ----------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <dialog id="myDialog" title="Dialog test" size="400,250" Resizable="false"
> Visible="true">
> <desktoppane Layout="FlowLayout">
> <panel>
> <label Text="oh its a label"/>
> </panel>
> </desktoppane>
> </dialog>
> --------------------------- snapp ---------------------------
> and the java-code:
> -------------------------------- snipp ----------------------
> swix.render("myDialog.xml");
> JDialog dialog = (JDialog) swix.find("myDialog");
> dialog.setModal(true); // don't work
> dialog.validate();
> --------------------------- snapp ---------------------------
Sounds good. But there is this 'visible="true"'. IMHO you can't make a visible
dialog
modal afterwards. Try this:
- Remove the 'visible="true"'
Use the following Java-Code:(
JDialog dialog = (JDialog) swix.render("myDialog.xml");
dialog.setVisible(true); // JDK 1.5
dialog.show(); // JDK 1.4 or both JDK 1.4 and 1.5
dialog.validate() is not necessary, Swixml does take care of that.
>
> Here is my Question:
>
> What is my Problem? How can i make a modal Dialog?
Put 'modal="true"' in your xml file or use dialog.setModal(true) before
you call dialog.setVisible(true).
Hope it helps,
Frank
>
>
> greetings
>
> Björn Schulz
>
>
> -----------------------------------------------------------------
> _______________________________________________
> Forum mailing list
> Forum@carlsbadcubes.com
> http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
>
_______________________________________________
Forum mailing list
Forum@carlsbadcubes.com
http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com