How do I display integer into textField

Posted on 2009-05-19
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.


whats the code to display in int?

Question by:chandanchoubey
LVL 13

Accepted Solution

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());
LVL 92

Assisted Solution

objects earned 60 total points
ID: 24420886

Author Closing Comment

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

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