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

x
?
Solved

Java Input

Posted on 1998-07-21
1
Medium Priority
?
227 Views
Last Modified: 2010-03-30
Can anyone tell me how to use the TextBox to read in numbers? Also how can I hide Labels until there needed?
TIA Matt Lesko
0
Comment
Question by:MattLesko
[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
1 Comment
 
LVL 1

Accepted Solution

by:
dryang earned 100 total points
ID: 1227496
go take a look at the number handling routines in the JDK package, eg. java.lang.Integer and look at the APIs available

using the Constructor
Integer intNum = new Integer(String number_you_want_to_convert);

or to use the API directly
Integer the_answer = Integer.getInteger(String number_you_want_to_convert);

or
int the_answer = Integer.parseInt(String number_you_want_to_convert);

2)
Label labeltest = new Label("Test");
labeltest.setVisible(false);

set the setVisible() to false to hide it setVisible(true) to show it
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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
In this post we will learn different types of Android Layout and some basics of an Android App.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
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

715 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