Are there some general guidelines to improve the performance of Swing?

Simon Brown

The Swing Connection (http://java.sun.com/products/jfc/tsc) has lots of articles on using Swing - as does the Java Developer Connection (http://java.sun.com/jdc) and JavaWorld (http://www.javaworld.com).

One article of interest is Performance secrets in Swing (http://java.sun.com/products/jfc/tsc/articles/performance/index.html) although it only covers a handful of areas.

Performing a search for "swing" & "performance" on the JDC (http://java.sun.com/jdc) will show other developers questions and answers regarding specific performance increases.

[FAQ Manager Note] One of the biggest things to watch out for with Swing performance is copying data from one model to another. Often, programmers will copy their real data into a Swing TableModel or TreeModel. The copy takes a lot of time, and is especially painful if you need to update the data.

Think about creating models that are proxies for your data, rather than keeping a complete copy of the data. You can see examples of this in Advanced Model View Controller Techniques (http://www7.software.ibm.com/vad.nsf/Data/Document2329). For more info on the Model-View-Controller paradigm, see

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.