I have a JDialog with a JTextArea component. This dialog shows the user what arguments to use when running the program to have it run the mode they just set up. I have a button on the dialog to copy the arguments to clipboard. This uses the copy() method on the JTextArea object.
This works perfectly and the clipboard contains the correct text up until the program is closed. Then the clipboard is lost. Is there anyway to have it retain this after the program is quit? The normal operation would be to then quit the program and start it again with the arguments.
This might sound strange but the idea is the user would setup an environment with the GUI and then run it with the arguments in a cron or similar.