(screenSize.height - frameSize.height) / 2);
(screenSize.height - frameSize.height) / 3);
   private void jbInit() throws Exception {      try {         setIconImage(GUIGraphicsUtils.getApplicationIcon().getImage());         // set title         setTitle(LangTool.getString("xtfr.wizardTitle"));         // Load the JDBC driver.         Driver driver2 = (Driver)Class.forName("com.ibm.as400.access.AS400JDBCDriver").newInstance();         DriverManager.registerDriver(driver2);         // Get a connection to the database.  Since we do not         // provide a user id or password, a prompt will appear.         connection = new SQLConnection("jdbc:as400://" + host, name, password);         // Create an SQLQueryBuilderPane         // object. Assume that "connection"         // is an SQLConnection object that is         // created and initialized elsewhere.         queryBuilder = new SQLQueryBuilderPane(connection);         queryBuilder.setTableSchemas(new String[] {"*USRLIBL"});         // Load the data needed for the query         // builder.         queryBuilder.load();         JButton done = new JButton(LangTool.getString("xtfr.tableDone"));         done.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(ActionEvent e) {               fillQueryTextArea();            }         });         JPanel panel = new JPanel();         panel.add(done);         getContentPane().add(queryBuilder, BorderLayout.CENTER);         getContentPane().add(panel, BorderLayout.SOUTH);         Dimension max = new Dimension(OperatingSystem.getScreenBounds().width,                                       OperatingSystem.getScreenBounds().height);         pack();         if (getSize().width > max.width)            setSize(max.width,getSize().height);         if (getSize().height > max.height)            setSize(getSize().width,max.height);         //Center the window         Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();         Dimension frameSize = getSize();         if (frameSize.height > screenSize.height)            frameSize.height = screenSize.height;         if (frameSize.width > screenSize.width)            frameSize.width = screenSize.width;         setLocation((screenSize.width - frameSize.width) / 2,                        (screenSize.height - frameSize.height) / 2);         setVisible(true);      }      catch (ClassNotFoundException cnfe) {         JOptionPane.showMessageDialog(null,"Error loading AS400 JDBC Driver",                                             "Error",                                             JOptionPane.ERROR_MESSAGE);      }   }