}
catch(com.sun.star.uno.Exception e) {
throw new StatusException("Could not create 'com.sun.star.awt.Toolkit'.", e);
}
XExtendedToolkit xExtendedToolkit = (XExtendedToolkit)UnoRuntime.queryInterface(XExtendedToolkit.class, aToolkit);
XTopWindow tw = null;
XAccessibleComponent xAccessibleComponent = null;
int k = xExtendedToolkit.getTopWindowCount();
for (int i=0;i<k;i++) {
try {
XTopWindow tw_temp = xExtendedToolkit.getTopWindow(i);
XAccessible xacc = (XAccessible)UnoRuntime.queryInterface(XAccessible.class, tw_temp);
if (xacc != null) {
System.out.println("Name: " + xacc.getAccessibleContext().getAccessibleName());
if (xacc.getAccessibleContext().getAccessibleName().startsWith("the title")) {
tw = tw_temp;