public void initMatrix()
    {
        set0ButtonActionPerformed(null);

        float m[][] = filter.getMatrix();
        int  size   = m[0].length;

        int start_position = 0;
        switch(size)
        {
            case 3 : start_position = 2; jComboBox1.setSelectedIndex(0); break;
            case 5 : start_position = 1; jComboBox1.setSelectedIndex(1); break;
            case 7 : start_position = 0; jComboBox1.setSelectedIndex(2); break;
        }
        windowSizeListValueChanged(null);


        for(int r = start_position; r < start_position + size; r++)
            for(int c = start_position; c < start_position + size; c++)
            {
                Float float_value = new Float(m[r - start_position][c - start_position]);

                String s = null;
                // Get rid of trailing zeroes
                if(float_value.floatValue() == float_value.intValue())
                    s = float_value.intValue() + "";
                else
                    s = float_value.floatValue() + "";



                textArray[r][c].setText(s);
            }
    }