title: How can I use general string in Jspinner?
body: <p>I have problem with JSpinner over to show Month in JSpinner and i have follow code bellow.I use swing control with jframe form to use spinner control. When I run project it always set default value 0. How to solve this error?</p>
  
  <pre><code> static protected String[] getMonthStrings(){
          String[] months=new DateFormatSymbols().getMonths();
          int lastIndex=months.length-1;
          if(months[lastIndex]==null || months[lastIndex].length()&lt;=0){
              String[] mS=new String[lastIndex];
              System.arraycopy(months,0,mS, lastIndex,0);
              return mS;
          }
          else{
              return months;
          }
      }
      public spinner(boolean CycleMonths) {
  
          initComponents();
          JTextField tf=null;
          String[] monthStrings = getMonthStrings();
           SpinnerListModel monthModel=null;
           if(CycleMonths){
               monthModel=new CycleSpinnerList(monthStrings);
           }
           else {
               monthModel=new SpinnerListModel(monthStrings);
           }
           spMonth=new JSpinner(monthModel);
      }
  </code></pre>