title: how to use ChangeListener for JSpinner?
body: <pre><code>private String[]fontsizelist = {"10","15","20"};
  private SpinnerListModel spinmodel = new SpinnerListModel(fontsizelist);
  private JSpinner fontsizeitem= new JSpinner(spinmodel);
  //Constructor
  
  some codes
  
  
           fontsizeitem.addChangeListener(new ChangeListener(){
  
          public void stateChanged(ChangeEvent e){
              for(int i=0;i&lt;fontsizelist.length;i++){
                  fontsizeitem [i]=new JSpinner(fontsizelist[i]);&lt;-shows error 
              }
          }
      });
  </code></pre>
  
  <p>This code shows me an error message </p>
  
  <p>array required, but JSpinner found</p>
  
  <p>I know what is the problem but I have no idea how should I fix.</p>
  
  <p>I am using a string array because an integer array did not work with </p>
  
  <p>SpinnerNumberModel and SpinnerListModel. </p>
  
  <p>The font size should be changed automatically when the state of JSpinner is </p>
  
  <p>changed. How should I do in my case? </p>