Hello Per, On Wednesday 06 January 2010, 17:16, Per Eriksson wrote: > Hello, > > I am trying to display an awt window, using the best possible ways, and > would like to get some options.
IIRC you wanted to work with awt dialogs... > I've tried using the awt.Toolkit to display an awt window of my own, but > received a tips from Ariel Constenla-Haile at framework that there are > better ways. if you want to show a dialog when a menu item is selected, there are better ways than creating an AWT window on your own. > An example code which I am trying to run is attached below, but this mailing list does not allow attachments (well, sometimes I attach plain source code text files, and pass to the list....) > crashes probably because of handle a related problem. > > What alterantives are there for displaying awt dialogs, for example when > pressing a menu item. [I repeat what I wrote to you privately] basically you have two options: * create a dialog at runtime * create a dialog designed in the OOo Dialog Editor in any case you do NOT need to create an AWT window (you will have life-time issues with this one). AFAIK the documentation is http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Basic/Creating_Dialogs_at_Runtime http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/GUI/Graphical_User_Interfaces http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Accessing_Dialogs There is also an example </opt/openoffice.org/basis3.2>/sdk/examples/DevelopersGuide/Components/dialogcomponent/ but not a very realistic one (I mean, it would have been more useful an example that shows a dialog when a menu/toolbar item is selected). Side note: as you seem not to be subscribed to the list, I CC'ed you. But you may miss some answers from people answering directly to the mailing list. Regards -- Ariel Constenla-Haile La Plata, Argentina --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
