Q:

Tag Input in Java Swing

We have multiple tag input in JS ( picture )

I wanted to know is there any default Java Swing facility to do it within JTextField or JTextArea. Is there any custom look-and-feel library or plugin to do so ?
Thanks a lot !

A:

No, there is no such component. You should be able to make your own easy enough:

Start with a JPanel using a FlowLayout and add a JTextField to the panel
Then you can add an ActionListener to the text field. When ever Enter is pressed you create a "TagComponnent" and add the component to the start of the panel and remove the text from the text field.
This "TagComponent" may just be a simple panel that contains a label (for the text) and a button (to remove) the component from the panel.

