In Java, as in other programming languages, all I/O (input/output) operations, including graphics, are quite expensive. In Java, character oriented I/O is especially costly, since it usually involves coding/decoding of every character.
However, perhaps the most insidious form of I/O operations is when you use object serialization (object persistence). Remember that writing an object entails writing all objects that can be reached by a chain of references from the given object. It is therefore quite easy to substantially underestimate the number of objects written.
Check if your application falls into this category by analyzing exclusive method clock times. There are a large number of standard Java methods responsible for I/O, but they should all be easily recognizable by name.