posted 22 years ago
How does one determine whether there is regular text or a component at the current caret position in a JTextPane? For instance..
JTextPane textInput = new JTextPane();
.
.
for(int i = 0; i < textInput.getText().length(); i++){
textInput.setCaretPosition(i);
//check to see whether the current caret position contains
//regular text (content) or if it contains a component.
}