FileDocCategorySizeDatePackage
BadLocationException.javaAPI DocJava SE 5 API1445Fri Aug 26 14:58:14 BST 2005javax.swing.text

BadLocationException

public class BadLocationException extends Exception
This exception is to report bad locations within a document model (that is, attempts to reference a location that doesn't exist).

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see {@link java.beans.XMLEncoder}.

author
Timothy Prinzing
version
1.20 12/19/03

Fields Summary
private int
offs
Constructors Summary
public BadLocationException(String s, int offs)
Creates a new BadLocationException object.

param
s a string indicating what was wrong with the arguments
param
offs offset within the document that was requested >= 0

	super(s);
	this.offs = offs;
    
Methods Summary
public intoffsetRequested()
Returns the offset into the document that was not legal.

return
the offset >= 0

	return offs;