JavaFX with ControlsFX #2 : Auto Complete TextField

Поделиться
HTML-код
  • Опубликовано: 4 фев 2025
  • This video explains how to give the normal JavaFX TextField power of auto completion. ControlsFX provides 'TextFields' class to bind a list of values to a TextField.
    I have used org.controlsfx.control.textfield.TextFields to bind set of Java Keywords with TextField for auto completing java keywords.
    Genuine Coder
    www.genuinecode...

Комментарии • 61

  • @leonardoalvaradotorres5659
    @leonardoalvaradotorres5659 5 лет назад +2

    Oh, my friend, thank you so much, I've trying other examples for a while and no one of them worked 'til I came here to watch your video (sorry for my english :) )

  • @mayurpatel481
    @mayurpatel481 7 лет назад +1

    your tutorials are awesome man.. keep uploading more. waiting for more controlfx videos!!

  • @brockkick188
    @brockkick188 6 лет назад

    that's awesome. please ahead and post tutorials on controlfx library.

  • @hornigoldarthur5522
    @hornigoldarthur5522 6 лет назад

    I have a class APerson, which is loaded from the database. Fathers, Mothers, Spouses. At present I have three ComboBoxes without Autocomplete, and it is working fine. I want to change it to ComboBox with autocomplete, so that the search for a particular name becomes easier. I use Scene Builder to design my screen. If I create the Combo Box in my controller, then the placement in the screen becomes a problem. Alternatively, I can create a Custom Control UI. For some reason, custom control creation keeps giving error, though I have done it earlier for a NUMERIC INPUT of a certain length, which works perfectly. I moved from JDK 8 to JDK 10, and from Netbeans to Eclipse, because Netbeans would not work with JDK 10. Can you suggest a solution ? Thanks in advance.

  • @adarshs5974
    @adarshs5974 4 года назад

    any way to trigger an event when i select a option? that will be really usefull

  • @elkinjr01
    @elkinjr01 7 лет назад +1

    How to style results of autocompletion?

  • @kirtikirti451
    @kirtikirti451 7 лет назад

    If textfield height is more, suggestion box doesn't come below textfield. it is shown in between of textfield.. Any settings to be made to adjust the offset of suggestion box?
    please help

  • @keithscull8288
    @keithscull8288 6 лет назад

    My god that is EASY. I remember in Swing an enormous PlainDocument class that still didn't work as well as this

  • @devangsharma6418
    @devangsharma6418 7 лет назад

    Function bindAutoComplete is not taking the second parameter as string. Also the initializable is showing as non acessible api. Help me.

  • @lumpi04300
    @lumpi04300 7 лет назад

    got a question there mate, i have a huge amount of different possible words (adresses) and the scrolling menu is over sizes :/ do you know if i can set a number of words max to display and then scroll ? thx and great vid !

    • @diamondmine360
      @diamondmine360 7 лет назад +1

      Hmm... You could try pre-cutting the addresses prior to having them appear, just cutting down string length to max number and THEN adding it to list, but this can be viewed as very inefficient. Sorry, that's all I got.

  • @JCHSTUDIO
    @JCHSTUDIO 4 года назад

    I am getting error in console at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source) and java.lang.NoClassDefFoundError: org/controlsfx/control/textfield/TextFields
    How to solve this

  • @oci96734
    @oci96734 8 лет назад

    I tried this, but it doesn't list only those options that start with the typed letters. So 'a' will result in 'apple', 'aardvark' and 'can', not just the first two. Anyway to just have it match the first letters?

    • @brianwsmithers
      @brianwsmithers 9 месяцев назад

      I may be 7 years too late but here’s an idea. You could make 26 different arrays that coincide with each letter of the alphabet. You’d use a switch case to determine which array to use based off the first letter of the word that you input. The array with the first letter would be put into that method and then you’d get your expected words.

  • @gkarki3
    @gkarki3 7 лет назад

    Is there any way to put auto complete feature with jfoniex textfield??

  • @NyanGuitar
    @NyanGuitar 7 лет назад

    Hello, how to set the background color of the popup list, in hover state?

  • @PlayWithCode30s
    @PlayWithCode30s 7 лет назад

    when running FXSampler in the source tab (Sample Source not found)
    how to get the sample code?

  • @canzengin3691
    @canzengin3691 4 года назад

    I am getting an error like no suitable method found for bindAutoComplation()

  • @vandersontelema8003
    @vandersontelema8003 6 лет назад

    I love your channel!

  • @EL.THIKA_Programmation
    @EL.THIKA_Programmation 4 года назад

    How about css of items

  • @nicolaschavez8841
    @nicolaschavez8841 5 лет назад

    nice, how i can edit that box with css??

  • @richardgohcr
    @richardgohcr 7 лет назад

    Hi is there a way to edit the suggestion box to appear as a list ABOVE the textfield instead?

    • @Simomajola1
      @Simomajola1 4 года назад

      Hi richard did you get this ?

  • @zsigatibor359
    @zsigatibor359 7 лет назад

    Hi! It seems to me that the autocomplete doesn't work if there is promt text. Can you solve this problem? Btw the feature is awesome and niche! Thanks for developing it!

    • @keithscull8288
      @keithscull8288 6 лет назад

      This may have been fixed, as I have prompt-text in my JFXTextField and this works fine with org.controls.fx repository version 9.0 :
      repo1.maven.org/maven2/org/controlsfx/controlsfx/9.0.0/

  • @swapnilgaikwad4673
    @swapnilgaikwad4673 7 лет назад

    hello sir how to use in any editor

  • @Aoubaker
    @Aoubaker 6 лет назад +1

    How to use this Auto with database?

    • @adrianflores6585
      @adrianflores6585 6 лет назад +2

      asking real questions here!!

    • @adrianflores6585
      @adrianflores6585 6 лет назад +1

      You have to retrieve the result of database as a list or collection.

    • @Aoubaker
      @Aoubaker 6 лет назад

      Adrian Flores thank you so much bro, I will try it

    • @KayoleKnight
      @KayoleKnight 6 лет назад

      I was to ask the same.... How do you make autocomplete suggest only from a column in the database..... Kindly help me

    • @KayoleKnight
      @KayoleKnight 6 лет назад

      Adrian Flores bro how do I do that

  • @muhammadmusharaf4705
    @muhammadmusharaf4705 7 лет назад

    Sir..
    Can you make a tutorial doing this same Auto complete in Java netbeans?

  • @atoivan
    @atoivan 5 лет назад

    pls how do you autocomplete from database

    • @cgme7076
      @cgme7076 5 лет назад +1

      I feel like as long as you can get the strings from your database (e.g., usernames), you can simply add them to an array with a foreach loop and it will have the same effect.

  • @dragonlai1083
    @dragonlai1083 5 лет назад

    If I have million possible words, could I use this code?

    • @GenuineCoder
      @GenuineCoder  5 лет назад

      You shouldn't. This component will be slow for such a huge dataset. You will have to implement a custom autocomplete textview component that takes from database or something like that.

    • @dragonlai1083
      @dragonlai1083 5 лет назад

      Genuine Coder Genuine Coder thx! I have MySQL date. But I don’t know how to use this database to implement auto complete List

    • @dragonlai1083
      @dragonlai1083 5 лет назад

      Please help me

  • @by_on
    @by_on 7 лет назад

    hi :) can you help me?? how to use button.performclick() like c# in javaFx???

  • @eliasmurgia7563
    @eliasmurgia7563 4 года назад

    Wonderful! Thanks!

  • @amraouianass7356
    @amraouianass7356 7 лет назад +1

    Thanks, although you should mention that ControlsFX is a library that should be added to the project.
    Anyway, here is the link: fxexperience.com/controlsfx/

  • @itappplayer340
    @itappplayer340 5 лет назад

    Thank you

  • @kingangel5837
    @kingangel5837 7 лет назад

    Nice VIdeo , but Can you send me the complete or full file proyect please in order to see , how did you do this becouse i sought all your VIds and i can't seen nothing about the other files for make it run in my netbeans IDE, so anyway thankyou so much and if you send me those file a will apreciate your TUTO, see you .

  • @brockkick188
    @brockkick188 6 лет назад

    add more videos on this.

  • @wejearif2164
    @wejearif2164 4 месяца назад

    Thankyouuu

  • @antoniozerssole5411
    @antoniozerssole5411 8 лет назад

    Gostei do video, mas pedia para que fizesse de novo passo-a-passo para entendermos melhor. se poder, faz a gentileza de enviar o video o mais rapido possivel. saudo a familia.

  • @TGMarketer
    @TGMarketer 8 лет назад +1

    Amazing

  • @allancastro7948
    @allancastro7948 6 лет назад

    Thanks!

  • @erfelipe
    @erfelipe 8 лет назад

    Muito bom mesmo!

  • @abdulrhmanbashammakh7006
    @abdulrhmanbashammakh7006 3 года назад

    Cool

  • @rogeriomq
    @rogeriomq 8 лет назад

    Nice!

  • @jugnu361
    @jugnu361 8 лет назад

    cool

  • @djamelbenali6883
    @djamelbenali6883 8 лет назад

    Amazing