_searchDialog.show();
_searchDialog.setVisible(true);
    public TextPanel() {        initComponents();        setName("Text");                Keymap keymap = JTextArea.addKeymap("MySearchBindings",                                           textTextArea.getKeymap());        //Ctrl-f to open the search dialog        keymap.addActionForKeyStroke(KeyStroke.getKeyStroke(KeyEvent.VK_F, Event.CTRL_MASK), new AbstractAction() {            public void actionPerformed(ActionEvent event) {                if (_searchDialog == null) {                    Container c = textScrollPane;                    while (! (c instanceof JFrame) && c.getParent() != null) {                        c = c.getParent();                    }                    if (c instanceof JFrame) {                        _searchDialog = new SearchDialog((JFrame) c, textTextArea);                    } else {                        System.err.println("No JFrame parent found!");                        return;                    }                }                _searchDialog.show();            }        });        // Ctrl-G to search again        keymap.addActionForKeyStroke(KeyStroke.getKeyStroke(KeyEvent.VK_G, Event.CTRL_MASK), new AbstractAction() {            public void actionPerformed(ActionEvent event) {                if (_searchDialog != null) {                    _searchDialog.doSearch();                }            }        });        // Ctrl-W to search again        keymap.addActionForKeyStroke(KeyStroke.getKeyStroke(KeyEvent.VK_W, Event.CTRL_MASK), new AbstractAction() {            public void actionPerformed(ActionEvent event) {                textTextArea.setLineWrap(! textTextArea.getLineWrap());            }        });                textTextArea.setKeymap(keymap);                textTextArea.getDocument().addDocumentListener(new DocumentListener() {            public void changedUpdate(DocumentEvent evt) {		_modified = true;            }            public void removeUpdate(DocumentEvent evt) {		_modified = true;            }            public void insertUpdate(DocumentEvent evt) {		_modified = true;            }        });    }