Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I display integer into textField

Posted on 2009-05-19
3
Medium Priority
?
1,213 Views
Last Modified: 2013-12-14
I am using netbeans. I want something to be displayed in textField. I can do that if the result is a string, but if the result is integer, it gives me error.

jTextField.setText("result");

whats the code to display in int?

Thanks
0
Comment
Question by:chandanchoubey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Accepted Solution

by:
Bart Cremers earned 260 total points
ID: 24420851
Wrap it using String.valueOf(...);

To get your int back you'll need Integer.parseInt(jTextField(getText());
0
 
LVL 92

Assisted Solution

by:objects
objects earned 240 total points
ID: 24420886
0
 

Author Closing Comment

by:chandanchoubey
ID: 31582945
Thank you very much, it worked excellent!!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question