Comparing 2 inputs with data set.

I already got it, now I would like to know how I can do it so that the error message does not appear in the console but in a jlabel