ArrayList of numbers
<p>I'm having trouble in my array. I want that everytime I click my "ButtonNew" memberId will automatically increase ex: 2012-000001 on my first click then 2012-0000002 on my second click (2012 is just the year today and "000001" is my array size). but of course i want that if i click again (ex: 2012-000003) then i cancelled the information(means that 2012-000003 didn't save in my database) my next click will still be 2012-000003 because i didn't save that. but how? do i really need arraylist here or count the number of rows in my database and then make it as size? here's my constructor:</p>

<pre><code>    public Member() {
    NumberFormat formatter = new DecimalFormat("000000");
    int size=0;
    size= this.accounts.size()+1;
    this.setMemberId(""+yearToday + "-" + (formatter.format(size)));

}
</code></pre>

<p>i dont know how am i going to put  this.accounts.add(); because i dont know what to add. 
here's my ButtonNew action</p>

<pre><code>    String last = "";
    Member memb = new Member();
    last = memb.getMemberId();
    this.txtMembersID.setText((last));
</code></pre>

<p>that's actually working but just displaying 2012-000001. means my array doesn't working pls. help.</p>
