Best practice for displaying text in Java?

I'm completing a university assignment in java. It consists of some inputs, a block of text and a graph dependent on the inputs.

In my course I've been taught to display text using drawString directly onto a graphics object. Surely there is a better way than this! Is there a component/container that can be used to display uneditable text?

Should I be using drawString to output textual information or some other way?

6
задан Andrew Thompson 15 April 2011 в 18:31
поделиться