Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5989125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:03:25+00:00 2026-05-22T23:03:25+00:00

Im working on a school project and i’m trying to check in GWT if

  • 0

Im working on a school project and i’m trying to check in GWT if a textbox i create is empty or not. I have done the exact same thing on another project and there it worked fine. i have searched for the answer here and on google but couldn’t find any answer.

voornaamTB = new TextBox();
voornaamTB.setText(null);

ok.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            if (voornaamTB != null) {
                System.out.println("not empty");
            } else {
                System.out.println("empty");
            }
        }
    });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:03:26+00:00Added an answer on May 22, 2026 at 11:03 pm

    Something like:

    if(!voornaamTB.getText().isEmpty()) { ...
    

    will work. You’re currently testing to see whether the TextBox itself is null, which it isn’t as you initialized it on the first line.

    You probably don’t need the setText(null) after immediately creating it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a school project, and I have to create a simple presentation
I am currently working on a school project and I'm not sure what is
In a school project, I have implemented a working syncadapter for syncing contacts with
My team working on a php/MySQL website for a school project. I have a
Working on a end of the year project for school and chose to create
I'm currently working on a school (matrix multiplier) project and I have a problem.
I'm working on a school project, and basically we're trying to learn about stack
I'm working on a school project which is to create an GPS for an
I'm working on a school project in Visual studio 2010. I'm trying to make
greeting all i am working on school project and i have a problem with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.