summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/GUI/MessageBox.java
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/DevelopersGuide/GUI/MessageBox.java')
-rw-r--r--odk/examples/DevelopersGuide/GUI/MessageBox.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/odk/examples/DevelopersGuide/GUI/MessageBox.java b/odk/examples/DevelopersGuide/GUI/MessageBox.java
index 90cf5c862315..bcc04bc88d13 100644
--- a/odk/examples/DevelopersGuide/GUI/MessageBox.java
+++ b/odk/examples/DevelopersGuide/GUI/MessageBox.java
@@ -33,6 +33,7 @@
*************************************************************************/
import com.sun.star.awt.Rectangle;
+import com.sun.star.awt.MessageBoxType;
import com.sun.star.awt.XMessageBox;
import com.sun.star.awt.XMessageBoxFactory;
import com.sun.star.awt.XVclWindowPeer;
@@ -173,9 +174,7 @@ public class MessageBox {
try {
Object oToolkit = m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", m_xContext);
XMessageBoxFactory xMessageBoxFactory = UnoRuntime.queryInterface(XMessageBoxFactory.class, oToolkit);
- // rectangle may be empty if position is in the center of the parent peer
- Rectangle aRectangle = new Rectangle();
- XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xParentWindowPeer, aRectangle, "errorbox", com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle, _sMessage);
+ XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xParentWindowPeer, MessageBoxType.ERRORBOX, com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle, _sMessage);
xComponent = UnoRuntime.queryInterface(XComponent.class, xMessageBox);
if (xMessageBox != null){
short nResult = xMessageBox.execute();