Archives for January 2004

Testing Strings for Equality

Strings are Objects in Java, but the ability to use literals, along with the String concatenation operator, make them somewhat similar to primitive types. Java also automatically “interns” String literals, meaning that a single String object will be created for a literal that is used multiple times. “String Equality and Interning” describes the effect of [...]

28 January 2004 | Basics | No Comments

Batch Text Inserts with JTextPane

Part II of “Faster JTextPane Text Insertion” describes another technique for overcoming some of JTextPane‘s performance limitations when initiatializing large documents with complex styles. The ElementSpec class, defined as part of DefaultStyledDocument, provides a way to batch updates and apply them in bulk. Depending on size and complexity of the document, the speed boost can [...]

4 January 2004 | GUI, Optimization | No Comments

Why are JTextPane inserts so slow?

Inserting a large amount of styled text into a JTextPane can be painfully slow. Part I of “Faster JTextPane Text Insertion” examines two sources of sluggishness and illustrates a simple solution for one of them. (Part II will describe an additional solution.)

2 January 2004 | GUI, Optimization | No Comments


Categories



Pages

Meta


Copyright 2003-2007 - Philip Isenhour