Solved

Java Input

Posted on 1998-07-21
1
216 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 50 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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
Certificat to iSeries KeyStore 1 30
ejb entity bean example 2 57
Selenium docs api java index 3 97
Find out all repos that a user is most active on Github 1 57
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

734 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