java - Float from a binary file into TextField? -


i have binary file i'm reading , want balance file , input textfield. variable float, how that?

specifically part of code.

while(true){     st = (savedtrans) ois.readobject();     viewtable.addrow(new object[] {st.getdate(), st.getdrop(), st.getcheckno(),                                            st.getdescription(), st.getdeposit(), st.getwithdraw(),                                     st.getbalance()}                      );     if(st == null){         break;     } 

i'm trying st.getbalance() display on textfield, possible way?

jtextfield inherits jtextcomponent class, therefore should have access settext() method. may not elegant solution, given information available code, method requires string type parameter, pass jtextfield.settext(float.tostring((float)st.getbalance()));


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -