javax.swing.text.BadLocationException: Position not represented by view

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

javax.swing.text.BadLocationException: Position not represented by view
at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1498)
at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1036)
at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1011)
at javax.swing.text.JTextComponent.modelToView(JTextComponent.java:1400)
at org.fife.ui.rtextarea.RTextAreaBase.possiblyUpdateCurrentLineHighlightLocation(RTextAreaBase.java:721)
at org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.foldToggled(RSyntaxTextArea.java:870)
at org.fife.ui.rsyntaxtextarea.folding.Fold.setCollapsed(Fold.java:508)
at org.fife.ui.rsyntaxtextarea.folding.Fold.toggleCollapsedState(Fold.java:537)
at javax.swing.text.AbstractDocument.handleRemove(AbstractDocument.java:608)
at javax.swing.text.AbstractDocument.remove(AbstractDocument.java:576)
at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:652)
at org.fife.ui.rtextarea.RTextArea.handleReplaceSelection(RTextArea.java:853)
at org.fife.ui.rtextarea.RTextArea.replaceSelection(RTextArea.java:1226)
at org.fife.ui.rtextarea.RTATextTransferHandler.handleReaderImport(RTATextTransferHandler.java:172)
at org.fife.ui.rtextarea.RTATextTransferHandler.importData(RTATextTransferHandler.java:275)
at javax.swing.TransferHandler.importData(TransferHandler.java:755)
at javax.swing.TransferHandler$TransferAction.actionPerformedImpl(TransferHandler.java:1696)
at javax.swing.TransferHandler$TransferAction.access$700(TransferHandler.java:1621)
at javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1645)
at javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1643)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
at javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1660)
at javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1658)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:1657)
at javax.swing.text.JTextComponent.invokeAction(JTextComponent.java:1485)
at javax.swing.text.JTextComponent.paste(JTextComponent.java:1463)
at org.fife.ui.rtextarea.RTextArea.paste(RTextArea.java:981)
at org.fife.ui.rtextarea.RTextAreaEditorKit$PasteAction.actionPerformedImpl(RTextAreaEditorKit.java:2020)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1645)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2859)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2894)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2822)
at java.awt.Component.processEvent(Component.java:6191)
at java.awt.Container.processEvent(Container.java:2083)
at java.awt.Component.dispatchEventImpl(Component.java:4776)
at java.awt.Container.dispatchEventImpl(Container.java:2141)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1856)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:722)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1000)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:865)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:686)
at java.awt.Component.dispatchEventImpl(Component.java:4648)
at java.awt.Container.dispatchEventImpl(Container.java:2141)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:690)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.