0

I have a short question. How can I make the input of a JTextField in JAVA only consist of names I have added to an ArrayList? Thanks in advance

OcA.ND
  • 1
  • 2
  • 2
    Sounds like you actually want a `JComboBox`. One that has an autocomplete function. Is than an accurate assumption? – Francis Bartkowiak Feb 07 '18 at 17:10
  • not quite sure. It is a huge program and what needs to be selected are options of thousands of addresses, which I've added to an ArrayList in a seperate method – OcA.ND Feb 07 '18 at 18:56
  • Take a look at [this article](http://esus.com/creating-auto-complete-jcombobox/). It sounds like you want to implement something like that. There are also other resources you can find such as [this](https://stackoverflow.com/a/13682101/8972283), and [this](http://www.algosome.com/articles/java-jcombobox-autocomplete.html). – Francis Bartkowiak Feb 07 '18 at 19:04

0 Answers0