I have a JPanel which contains a number of JTextField(s) that have a length limit of a few characters (implemented by a custom PlainDocument).
I want to display a text in red font at the top left of the panel saying, "**Fields allow a max of 20 characters!".
Two options that I am considering so far is adding a TitledBorder or a JLabel. What is the best way to do this?
Thank you.