javax.swing.text
Class BadLocationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.swing.text.BadLocationException
All Implemented Interfaces:
Serializable

public class BadLocationException
extends Exception

Indicates that an invalid location within a Document has been accessed.

See Also:
Serialized Form

Constructor Summary
BadLocationException(String str, int offset)
          Constructs a BadLocationException
 
Method Summary
 int offsetRequested()
          Returns the offset into the document that was not legal.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BadLocationException

public BadLocationException(String str,
                            int offset)
Constructs a BadLocationException

Parameters:
str - a string indicating what was wrong with the arguments
offset - offset within the document that was requested >= 0
Method Detail

offsetRequested

public int offsetRequested()
Returns the offset into the document that was not legal.

Returns:
the offset into the document that was not legal