Say i'm using the following code to prompt an error message in my simple swing application:
JOptionPane.showMessageDialog(null, message, "Error", JOptionPane.ERROR_MESSAGE);
Is there any way I could make it possible for the user to highlight text sections (for copy/paste purpose)?
Many thanks.
try this
JTextArea textarea= new JTextArea("add your message here");
textarea.setEditable(true);
JOptionPane.showMessageDialog(null, textarea, "Error", JOptionPane.ERROR_MESSAGE);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With