• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

Jtextfield

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
psteph
Asked:
psteph
1 Solution
 
tarltonCommented:
What you want to do is this:

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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now