Java Utililty Methods JTextField Auto Complete

List of utility methods to do JTextField Auto Complete

Description

The list of methods to do JTextField Auto Complete are organized into topic(s).

Method

voidinstallAutoComplete(final JTextField textField, final List items, final String stringMethodType, final boolean ignoreCase)
install Auto Complete
final JList jList = new JList();
jList.addListSelectionListener(new ListSelectionListener() {
    @Override
    public void valueChanged(ListSelectionEvent e) {
        System.out.println("select");
});
final DefaultListModel model = new DefaultListModel();
...
voidsetupAutoComplete(final JTextField textField, final List items, final String stringMethodType, final boolean ignoreCase)
setup Auto Complete
final DefaultComboBoxModel model = new DefaultComboBoxModel(items.toArray());
final JComboBox combo = new JComboBox(model) {
    private static final long serialVersionUID = 1L;
    public Dimension getPreferredSize() {
        return new Dimension(super.getPreferredSize().width, 0);
};
combo.putClientProperty(Integer.toHexString(combo.hashCode()) + "@is_adjusting", false);
...