this.setLocationByPlatform(true);
utils.setDefWinPos(this);
    private void initialize(String tableName, Vector<FmtItem> columns, YajJobFilter init) {        final int border = 12;        double[][] dLay = {                { border, TableLayout.FILL, border, TableLayout.PREFERRED, border},                { border, TableLayout.PREFERRED, border / 2, TableLayout.PREFERRED, border / 2, TableLayout.PREFERRED, border, TableLayout.FILL, border}        };        this.columns = columns;                JPanel contentPane = new JPanel(new TableLayout(dLay));                buttonOK = new JButton(utils._("OK"));        buttonOK.setActionCommand("ok");        buttonOK.addActionListener(this);        /*buttonCancel = new JButton(utils._("Cancel"));        buttonCancel.setActionCommand("cancel");        buttonCancel.addActionListener(this);*/        Action actCancel = new AbstractAction() {            public void actionPerformed(ActionEvent e) {                returnValue = null;                dispose();            };        };        actCancel.putValue(Action.NAME, utils._("Cancel"));        buttonCancel = new JButton(actCancel);        buttonCancel.getActionMap().put("EscapePressed", actCancel);        buttonCancel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "EscapePressed");                Dimension maxButtonDim = new Dimension(buttonOK.getPreferredSize());        maxButtonDim.width = Integer.MAX_VALUE;        buttonOK.setMaximumSize(maxButtonDim);        buttonCancel.setMaximumSize(maxButtonDim);                Box boxButtons = Box.createVerticalBox();        boxButtons.add(buttonOK);        boxButtons.add(Box.createVerticalStrut(border));        boxButtons.add(buttonCancel);        boxButtons.add(Box.createVerticalGlue());                buttonAdd = new JButton(utils._("Add"));        buttonAdd.setActionCommand("add");        buttonAdd.addActionListener(this);        /*buttonLess = new JButton(utils._("Less"));        buttonLess.setActionCommand("less");        buttonLess.addActionListener(this);*/        panelCondButtons = new JPanel(null, false);        panelCondButtons.setBorder(BorderFactory.createEmptyBorder(border, border, border, border));        panelCondButtons.setLayout(new BoxLayout(panelCondButtons, BoxLayout.LINE_AXIS));        panelCondButtons.add(buttonAdd);        /*panelCondButtons.add(Box.createHorizontalStrut(border));        panelCondButtons.add(buttonLess);*/        panelCondButtons.add(Box.createHorizontalGlue());        panelCondButtons.setMaximumSize(new Dimension(Integer.MAX_VALUE, panelCondButtons.getPreferredSize().height));                JLabel lblPrompt = new JLabel(utils._("Only display fax jobs fulfilling:"));                radAny = new JRadioButton(utils._("Any of the following conditions"));        radAny.setSelected(true);        radAll = new JRadioButton(utils._("All of the following conditions"));        groupAllAny = new ButtonGroup();        groupAllAny.add(radAny);        groupAllAny.add(radAll);                panelConditions = new JPanel(null);        panelConditions.setLayout(new BoxLayout(panelConditions, BoxLayout.PAGE_AXIS));                scrollConditions = new JScrollPane(panelConditions, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);        if (init != null && (init instanceof AndFilter)) {            for (YajJobFilter yjf : ((AndFilter)init).getChildList()) {                FilterPanel fp = newFilterPanel();                fp.initFromFilter(yjf);                panelConditions.add(fp);            }            if (init instanceof OrFilter) {                radAny.setSelected(true);            } else {                radAll.setSelected(true);            }        }        // Ensure that at least 3 panels are visible:        if (panelConditions.getComponentCount() < 3) {            for (int i = panelConditions.getComponentCount(); i < 3; i++)                panelConditions.add(newFilterPanel());        }        panelConditions.add(panelCondButtons);        panelConditions.add(Box.createVerticalGlue());                contentPane.add(lblPrompt, "1, 1");        contentPane.add(radAll, "1, 3");        contentPane.add(radAny, "1, 5");        contentPane.add(scrollConditions, "1, 7");        contentPane.add(new JSeparator(JSeparator.VERTICAL), "2, 0, 2, 8, c, f");        contentPane.add(boxButtons, "3, 1, 3, 7");                this.setTitle(MessageFormat.format(utils._("Custom filter for table {0}"), tableName));        this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);        this.setContentPane(contentPane);        this.addWindowListener(new WindowAdapter() {            public void windowClosing(java.awt.event.WindowEvent e) {                returnValue = null;            };                        public void windowClosed(java.awt.event.WindowEvent e) {                utils.getFaxOptions().customFilterBounds = getBounds();            };        });                //this.setMinimumSize(this.getSize());        if (utils.getFaxOptions().customFilterBounds != null) {            this.setBounds(utils.getFaxOptions().customFilterBounds);        } else {            this.pack();            this.setLocationByPlatform(true);        }    }