Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Copy from TableView list

  1. #1
    Junior Member
    Join Date
    Mar 2021
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Copy from TableView list

    I need a little help, I made an JavaFX application in which it prints a large number of columns and rows in the Table View list. Now I would like to create a command that will automatically copy the entire contents of that TableView list, so I made a "Copy" button, now I would like to automatically copy all rows and columns from TableView when I press that key and of course I can paste that content elsewhere on my computer?

    thanks in advance!

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    24,380
    Thanks
    54
    Thanked 2,636 Times in 2,586 Posts
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Mar 2021
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Copy from TableView list

    I made an application like this (https://gist.github.com/mansueli/1806103bf9873adaba0d), but here the problem is that I copy only one row / column, I need a command that will copy the whole list to me, meaning the entire contents of the table without my marking and selection, everything in that table to copy do you understand me now?

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    24,380
    Thanks
    54
    Thanked 2,636 Times in 2,586 Posts

    Default Re: Copy from TableView list

    Some code in those posts show how to get a cell's contents given its row and column.
    Change that code to go row by row from the first row to the last row
    and for each row to get each cell from the first to the last cell on the row.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 1
    Last Post: January 12th, 2021, 06:38 AM
  2. Tableview custom button not responding
    By okimait in forum Computer Support
    Replies: 1
    Last Post: October 7th, 2020, 08:16 AM
  3. copy() to copy the values of singly linked list1 to another linked list
    By ritika3 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 25th, 2017, 07:16 AM
  4. How to copy
    By JNewbie in forum Object Oriented Programming
    Replies: 4
    Last Post: April 14th, 2014, 11:50 AM
  5. Replies: 3
    Last Post: October 5th, 2013, 09:14 AM