Article View: borland.public.jbuilder.java.swing
Article #9939JTextPane: Exception on selection
From: Darko Krsul
Date: Tue, 14 Dec 1999 00:00
Date: Tue, 14 Dec 1999 00:00
41 lines
2725 bytes
2725 bytes
Selecting text inside JTextPane(dragging the cursor) and passing the last character throws following exception: Exception occurred during event dispatching: java.lang.IllegalArgumentException: index 1 >= 1 at javax.swing.text.StandardExtendedTextLabel.validate(Compiled Code) at javax.swing.text.StandardExtendedTextLabel.getCharX(Compiled Code) at javax.swing.text.LabelView$LabelFragment.viewToModel(Compiled Code) at javax.swing.text.LabelView.viewToModel(Compiled Code) at javax.swing.text.CompositeView.viewToModel(Compiled Code) at javax.swing.text.BoxView.viewToModel(Compiled Code) at javax.swing.text.CompositeView.viewToModel(Compiled Code) at javax.swing.text.BoxView.viewToModel(Compiled Code) at javax.swing.text.CompositeView.viewToModel(Compiled Code) at javax.swing.text.BoxView.viewToModel(Compiled Code) at javax.swing.plaf.basic.BasicTextUI$RootView.viewToModel(Compiled Code) at javax.swing.plaf.basic.BasicTextUI.viewToModel(Compiled Code) at javax.swing.text.DefaultCaret.moveCaret(Compiled Code) at javax.swing.text.DefaultCaret.mouseDragged(Compiled Code) at java.awt.Component.processMouseMotionEvent(Compiled Code) at javax.swing.JComponent.processMouseMotionEvent(Compiled Code) at java.awt.Component.processEvent(Compiled Code) at java.awt.Container.processEvent(Compiled Code) at java.awt.Component.dispatchEventImpl(Compiled Code) at java.awt.Container.dispatchEventImpl(Compiled Code) at java.awt.Component.dispatchEvent(Compiled Code) at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled Code) at java.awt.LightweightDispatcher.processMouseEvent(Compiled Code) at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code) at java.awt.Container.dispatchEventImpl(Compiled Code) at java.awt.Window.dispatchEventImpl(Compiled Code) at java.awt.Component.dispatchEvent(Compiled Code) at java.awt.EventQueue.dispatchEvent(EventQueue.java:258) at java.awt.EventDispatchThread.run(EventDispatchThread.java:68) Small testing application is created in JBuilder3 by simply adding JtextPane to a JFrame, without any intervention in the code. Is this a bug and what can be done to avoid this? Thanks.
Technical Details
Message-ID:
<3856B664.DE136E0F@pathcom.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,90abad8cd4248947,start X-Google-Attributes: gid111d45,public From: Darko Krsul <darkok@pathcom.com> Subject: JTextPane: Exception on selection Date: 1999/12/14 Message-ID: <3856B664.DE136E0F@pathcom.com> X-Deja-AN: 560696277 Content-Transfer-Encoding: 7bit Organization: Another Netscape Collabra Server User X-Accept-Language: en Content-Type: text/plain; charset=iso-8859-2 Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing