Is there any library that can check my jtextarea the right input time format?
for example the input format must be hh:mm:ss or hh:mm only.
Not sure why you want to use a JTextArea
for this, as it's really designed to allow the user to type free text.
Normally you would use a DocumentFilter
and for more examples
Other options would include the use for a JFormattedTextField
or JSpinner
You can use a JFormattedTextField
with MaskFormatter
, as shown in this question: JFormattedTextField with MaskFormatter