Re: little input dialog
List for Users of Carlsbad Cubes' Technologies and Products <[email protected]> Mon, 10 Oct 2005 19:55:02 +0200
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Organization | http://freemail.web.de/ |
| Message-ID | <[email protected]> |
List for Users of Carlsbad Cubes' Technologies and Products <Forum@carlsbad=
cubes.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=3D"true" ' i see nothing in desktoppane. But i leave out this, i =
can
> see it. Here is the xml-file: =
> -------------------------------- snipp ---------------------- =
> <?xml version=3D"1.0" encoding=3D"UTF-8"?> =
> <dialog id=3D"myDialog" title=3D"Dialog test" size=3D"400,250" Resizable=
=3D"false" Visible=3D"true"> =
> <desktoppane Layout=3D"FlowLayout"> =
> <panel> =
> <label Text=3D"oh its a label"/> =
> </panel> =
> </desktoppane> =
> </dialog> =
> --------------------------- snapp ---------------------------
> and the java-code: =
> -------------------------------- snipp ---------------------- =
> swix.render("myDialog.xml"); =
> JDialog dialog =3D (JDialog) swix.find("myDialog"); =
> dialog.setModal(true); // don't work =
> dialog.validate(); =
> --------------------------- snapp --------------------------- =
Sounds good. But there is this 'visible=3D"true"'. IMHO you can't make a vi=
sible dialog
modal afterwards. Try this:
- Remove the 'visible=3D"true"'
Use the following Java-Code:(
JDialog dialog =3D (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=3D"true"' in your xml file or use dialog.setModal(true) before
you call dialog.setVisible(true).
Hope it helps,
Frank
> =
> =
> greetings =
> =
> Bj=F6rn Schulz
> =
> =
> -----------------------------------------------------------------
> _______________________________________________
> Forum mailing list
> [email protected]
> http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
> =