If you want to mix text with line drawing, see the next
page, otherwise use a text component. We have already seen a
couple of types of text component. One is the JLabel class, and the other is the JButton class. There is plenty of information about other text components, particilarly JTextField, JPasswordField, JTextArea, JEditorPane and JTextPane, in the Java Tutorial:
As an example, here is a text editor in Java: