private static String showDualDialog(JComboBox theSelectBox, JComboBox theReplaceBox,
            JLabel labelUpper, JLabel labelUpperMid, JLabel labelLowerMid,
            JLabel labelLower) {
        cont = true;
        JFrame theFrame = new JFrame("Instrument Replacer");
        theFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

        theSelectBox.setPreferredSize(new Dimension(150, 25));
        theReplaceBox.setPreferredSize(new Dimension(150, 25));


        JButton ok = new JButton("Ok");
        ok.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                cont = false;
            }

        });
        ok.setPreferredSize(new Dimension(75, 25));

        JButton cancel = new JButton("Cancel");
        cancel.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                cancelPressed = true;
                cont = false;
            }

        });
        cancel.setPreferredSize(new Dimension(75, 25));



        JPanel okCancel = new JPanel();
        okCancel.add(ok);
        okCancel.add(cancel);


        JPanel panelNorth = new JPanel();
        panelNorth.setLayout(new BoxLayout(panelNorth, BoxLayout.Y_AXIS));

        JPanel panelSouth = new JPanel();
        panelSouth.setLayout(new FlowLayout());

        JPanel comboSelectBox = new JPanel();
        comboSelectBox.add(theSelectBox);

        JPanel comboReplaceBox = new JPanel();
        comboReplaceBox.add(theReplaceBox);


        panelNorth.add(labelUpper);
        panelNorth.add(labelUpperMid);
        panelNorth.add(comboSelectBox);
        panelNorth.add(labelLowerMid);
        panelNorth.add(labelLower);
        panelNorth.add(comboReplaceBox);

        panelSouth.add(panelNorth);
        panelSouth.add(okCancel);

        theFrame.setContentPane(panelSouth);
        theFrame.setSize(220, 210);
        theFrame.setLocationRelativeTo(null);
        theFrame.setResizable(false);
        theFrame.setVisible(true);

        while(cont) {
            try {
                Thread.sleep(1);
                if (!theFrame.isVisible()) {
                    return null;
                }
            } catch (InterruptedException e) {
                continue;
            }
        }

        theFrame.dispose();
        if (cancelPressed)
            return null;

        return selection + " " + replacement;
    }