I have a JDialog with a JTextArea component. This dialog box shows the user what arguments to use when starting the program to start the mode they just configured. I have a button in the dialog box to copy the arguments to the clipboard. This uses the copy () method for the JTextArea object.
This works fine, and the clipboard contains the correct text until the program is closed. Then the clipboard is lost. Is there anyway to save this after the program ends? The usual operation would then be to exit the program and start it again with arguments.
This may seem odd, but the idea is that the user will set up a GUI environment and then run it with arguments in cron or similar.
source
share