JavaFX and Scene Builder - Adding and Deleting TableView Rows

Поделиться
HTML-код
  • Опубликовано: 19 ноя 2024

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

  • @nitnelavspetorials
    @nitnelavspetorials 2 года назад +4

    Thanks for this. I needed a bit of help to start my databases application.

  • @laggounemouade4931
    @laggounemouade4931 2 года назад +1

    a great person you deserve more than a 799 subscribe

    • @Randomcode_0
      @Randomcode_0  2 года назад

      Thank you so much, the positive support means a lot!

  • @reamsel
    @reamsel 2 года назад +2

    I do exactly what you did but I get "Cannot resolve method 'setCellValueFactory' in 'Controller'"

  • @engineeringschool1992
    @engineeringschool1992 2 года назад +1

    I have one extra string , what to write in the submit action button after declaring customer and the integerparse int

    • @Randomcode_0
      @Randomcode_0  2 года назад +1

      This setup is using the concept that my listview contains information regarding an object, I would therefore add this extra string as an attribute to my customer class.

  • @tttttroll
    @tttttroll 2 года назад

    @Random code what about a button that once its clicked it adds the time to a check out listvew in a different scene ?

  • @moiyetresorkonan6326
    @moiyetresorkonan6326 Год назад

    thank you you really helped me .God blessed you

    • @Randomcode_0
      @Randomcode_0  Год назад

      You're very welcome! I'm happy to hear that I could be of help to you.

  • @petucharik7270
    @petucharik7270 Год назад

    hello, did you have problem with deleting last row of the table? I can delete all the tables except the last one, how can i fix this?

    • @Randomcode_0
      @Randomcode_0  Год назад +1

      Just tried to rerun this old project, and I am able to remove all elements I add to the TableView, including the last one.

    • @petucharik7270
      @petucharik7270 Год назад

      @@Randomcode_0 my problem is apparently caused by the fact that I store the data for the table in an observable list and when I remove the last element from it, it is removed, but not removed from the table and loaded again into the list, if I remove from the table, then it is not removed from the list

  • @katt2478
    @katt2478 2 года назад

    hello, I need help please !
    do we need to use MySQL to make the tableView work ?? for my case I need to make my tableView do sum calculations for me like (sum, average, max/min ...etc) just like we usually do with Microsoft Excel , can I??

    • @dzpro2115
      @dzpro2115 2 года назад

      Yes we can populate the tableview from mysql database. And then do some calculations.

  • @mastershonobi110
    @mastershonobi110 Год назад

    So…in the Customer class would it not be easy to use the Wrapper Class “Integer” to begin with..instead of the Primitive “int?” Wouldn’t this avoid the later using “ParseInt” to the “age” convert into an “Object” later? Just asking… thanks

    • @Randomcode_0
      @Randomcode_0  Год назад +1

      It is an excellent question. In this case, I do not think it would change anything as we use 'Integer.parseInt(ageInput.getText())' because we get the age as a string from a TextField. The main advantage of primitives is that they can't be null, which helps avoid null-related problems. However, it might be possible to create a number input field that can prevent the need for this casting.

    • @mastershonobi110
      @mastershonobi110 Год назад +1

      @@Randomcode_0 thank you for taking the time to reply. 🙌🏿🙏🏾☺️

  • @lucasmuscolo6026
    @lucasmuscolo6026 3 года назад +1

    Thanks a lot for this.... great job

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      Glad you liked it!

    • @lucasmuscolo6026
      @lucasmuscolo6026 3 года назад +1

      @@Randomcode_0 Totally you made it so simple.... There are other videos that make it hard with no sense... jajajajaja

  • @mahmoudtimoumi9061
    @mahmoudtimoumi9061 2 года назад

    thank you for the vedio but the delete method only delete the value in sceen builder not in the data Base, Can you give me a hint about this ? Have a good day

    • @Randomcode_0
      @Randomcode_0  2 года назад

      We would need to set up some CRUD connection which would often be placed inside a singleton, which would handle the database connection. for the database connection, a way to do it would be to change your data in the database and then reload the tableview using the data in the database.

  • @Nando30Slzr
    @Nando30Slzr 2 года назад

    thanks very much , the information the video is very perfect , new suscriptor

  • @rezgarklv5104
    @rezgarklv5104 2 года назад

    Thanks so much!!

  • @ThePawcioRavage
    @ThePawcioRavage 3 года назад +1

    And can u show how to edit data in tableview?

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      I will add “edit tableview data” to my list of things to do.

    • @Randomcode_0
      @Randomcode_0  3 года назад +1

      Take a look at my newst video regarding "Edit TableView: ruclips.net/video/3s8s0vyfLV8/видео.html

  • @omaram9132
    @omaram9132 Год назад

  • @almaestrobaz3521
    @almaestrobaz3521 2 года назад

    How to focus this table?

    • @Randomcode_0
      @Randomcode_0  2 года назад

      You can click an item on the table or use TAB to interact with the table, however, I am not quite sure what you mean?

    • @almaestrobaz3521
      @almaestrobaz3521 2 года назад

      I have a text field to search for data inside the table ,but it only works when I click on the table.
      I have used the function table. requestfocus() but its not working
      Help pls 💚

  • @katt2478
    @katt2478 2 года назад

    hello, I need help please !
    do we need to use MySQL to make the tableView work ?? for my case I need to make my tableView do sum calculations for me like (sum, average, max/min ...etc) just like we usually do with Microsoft Excel , can I??

    • @Randomcode_0
      @Randomcode_0  2 года назад

      You can use the tableview without any SQL, it is used to display the data from a java object. you can extract all this information and then use java to calculate whatever you want, but you cant use a plain table view to do complex calculations.

    • @katt2478
      @katt2478 2 года назад

      @@Randomcode_0 thank u so much for answering ! it really means a lot to me.
      I'm a begginer in java.. so after extracting the data.. i can do the calculation.. Can i make on of the TableView 's cells show the result of the calculations ? please tell me more
      thank you again !

    • @Randomcode_0
      @Randomcode_0  2 года назад

      ​@@katt2478 The table view is fixed where every row will contain the same information. Therefore I think it would be simpler to just have some text display your calculations, but everything is possible.

    • @katt2478
      @katt2478 2 года назад

      @@Randomcode_0 yes this is just what i keep finding in the tutorials ...