I want to ask. I have 3 textfield. For example I just have 2 number so I fill at the first and second textField. But, if I want to calculate the value of this textfield, I need to enter 0 to the third textfield. So, I want to ask about that and I used JAVA GUI ECLIPSE

Recommended Answers

All 2 Replies

It's not clear what yo are asking... can you explain your question in more detail?

commented: and third textfield need to insert value . So, what can I do with this problem? +0

When you get the value from the 3rd text field you could check if it's empty and treat that as a zero, eg something like

int value3;
if (field3.getText().trim().length() > 0) value3 = Integer.parseInt(field3.getText());
else value3 = 0;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.