import javax.swing.*; class ExtractWord { private static final char BLANK = ' '; public static void main(String[] args) { String myStr, word; int len, index, startIndex, endIndex; myStr = JOptionPane.showInputDialog(null,"Enter a list of words separated by spaces"); len = myStr.length(); index = 0; while (index < len) { // skip over spaces while ((index