I am a student at ISU. I was working on a homework assignment where I wanted to get text that was selected (highlighted) in a TextArea to appear in a JOptionPane dialog. I tried many of the methods for JOptionPane, but I could not get any of them to place the text the user selected in the input field of the dialog.
I guess that I could make a one element String array and pass this to the JOptionPane constructor listed.
JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue)
This is not way I wanted to implement the JOptionPane. Please give me any help you can. Thanks and there is no hurry as the assignment has been handed in.