Solved

Jtextfield

Posted on 1998-09-04
1
143 Views
Last Modified: 2010-03-30
I am trying to do the following
  if(tx1 = = null){
    tx1.setText(String.valueOf(0));
it doesn't work, is there a better way to do this?
0
Comment
Question by:psteph
1 Comment
 

Accepted Solution

by:
tarlton earned 50 total points
ID: 1223602
What you want to do is this:

if ( tx1.getText().equals("") )
{
   // Do some stuff
}
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
powerN  challenge 3 47
countHi challenge 25 84
advertisement module in core php 4 92
github account with ecipse 1 20
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 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 …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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.

760 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now