I am in NetBeans doing a Java lottery application in which the number of winners is entered (both incumbents and substitutes, in case the former can not receive the prize), the list of winners is loaded. names in the text box and it is drawn.
In this case the list of names would load it copying the 'Like' of a publication made on Facebook, so when copying everything in the notebook comes out with the text of "Add to friends" below.
The query is as follows: How could I copy this text in the text box of the program and click on "Confirm" to order the names in an arrayList and then make the draw? I think the most convenient thing is for the arrayList to pass a JList , if there is another better way, please tell me. The raffle would do it with Random, that's not much more complicated, but I can not achieve the other.
Thank you very much!