zerofill method using java -


i want textfield become “99999”

this code

while (rs.next()){     int s=rs.getint("number");     string num1 = string.valueof(s);     string n = string.format("%05d",num1);     view.txtcustomernumber.settext(n); } 

why txtcustomernumber(jtextfield) blank

try this.

while (rs.next()){ int s=rs.getint("number"); string n = string.format("%05d",s); view.txtcustomernumber.settext(n); } 

it might solve problem.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -