user9247350
user9247350

Reputation:

How to display calculated value in Label without submission? Java

The situation is: I want to use two date values obtained from two jDateChoosers and calculate the number of days between two selected days. The question is: what should I do that after choosing both dates a calculated value would appear in a label (or Text Field, which one is better?) without any additional submission (in other words, without clicking on any buttons ect.)?

Upvotes: 0

Views: 98

Answers (1)

Scain40
Scain40

Reputation: 21

Have an actionListener checking for if both dates have been input when the jDateChoosers close and then have a function such as update() to perform the calculations and update your label

Upvotes: 1

Related Questions