• Post Reply Bookmark Topic Watch Topic
  • New Topic

cant get my double's on my screen >< please help ><  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


so I have some text fields in java Swing that I'm trying to populate with data in these variables, now the top block of code works fine because the variables are of type String and the setText(String); method works

My problem lies in not being able to set the value of my textfields to a variable of type double, when I try i get the error actual argument double cannot be converted to java.lang.string.


Is there any way of parsing the variables contents and then converting that to string or ?
 
Joshua Jones
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
never mind solved by doing textfield.setText(Double.toString(Variable));
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!