Why won't this font change size?
<p>I'm making a wordpad program and have tried to create a JComboBox to  change font size. It runs/compiles and shows my options, but when I click on an index the font size won't change. This is the only method that modifies font size, any suggestions to make it work?</p>

<pre><code> fontsize.addActionListener(
                    new ActionListener(){
                        public void actionPerformed(ActionEvent e)
                        {
                            if(fontsize.getSelectedIndex()==0)
                            {
                                txt.setFont(txt.getFont().deriveFont(10));
                                txt.setLineWrap(true);
                            }

                            else if(fontsize.getSelectedIndex()==1){
                                Font fontss = txt.getFont();
                                Font biggerFont = fontss.deriveFont(10);
                                txt.setFont(biggerFont);
                                txt.setLineWrap(true);
                        }
                            else if(fontsize.getSelectedIndex()==2){
                                Font fontss = txt.getFont();
                                Font biggerFont = fontss.deriveFont(10);
                                txt.setFont(biggerFont);
                                txt.setLineWrap(true);
                    }
                            else if(fontsize.getSelectedIndex()==3){
                                Font fontss = txt.getFont();
                                Font biggerFont = fontss.deriveFont(10);
                                txt.setFont(biggerFont);
                                txt.setLineWrap(true);
                    }
                            else{}
                        }
                    }
                    );
</code></pre>