Solved

How do I display integer into textField

Posted on 2009-05-19
3
1,198 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
3 Comments
 
LVL 13

Accepted Solution

by:
Bart Cremers earned 65 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 60 total points
ID: 24420886
0
 

Author Closing Comment

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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet  URL Rewriting 1 42
How to execute a Python program and gather return output in Java 2 41
login form jsp example 2 38
Is there a simpler dropbox system? 10 35
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

820 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