JTextArea/JTextComponent setText cause Crash.
===

I am new to Java in general and in particular in the Swing library.
When i experiment with Notepad demo(standard demo from JDK), i get crash when try to change Text in  editor window.
My example code.

     void Filter(Component f){
            if (f instanceof JTextComponent){
                JTextComponent textComponent = (JTextComponent) f;
                textComponent.setVisible(false);       //Work
                textComponent.setVisible(true);        //Work
                textComponent.getText();               //Work
                textComponent.updateUI();              //Work
                textComponent.setText("Hello world!"); //Crash
            }else{
                RecursiveGet(f);
            }
        }
        void RecursiveGet(Component c){
            for (Component f : ((JComponent) c).getComponents())
            {
                if (f instanceof JComponent)
                {
                    Filter(f);
                }
            }
        }

I search for instance of **JTextComponent**, until i find it and then test some methods.
I think i miss something, some details.
My environment JDK 1.7, JRE 7.0, Win7 x64. 
I will be glad to have any help. Thank you.