Matt
Matt

Reputation: 11357

Console within a JFrame

I want a scrollable console within a JFrame, so people can see messages while using the GUI.

I'm currently using a JLabel, but this obviously only allows one message at a time.

Upvotes: 1

Views: 2079

Answers (3)

AlexR
AlexR

Reputation: 115388

I'd suggest you JTextArea or JScrollPane.

Upvotes: 0

Codemwnci
Codemwnci

Reputation: 54944

Use a JEditorPane, it is the most flexible.

Upvotes: 0

Guillaume
Guillaume

Reputation: 5553

Have you checked the JTextArea Swing component?

This tutorial should help you as there is a scrollable text area in one of the samples: http://download.oracle.com/javase/tutorial/uiswing/components/textfield.html

Upvotes: 5

Related Questions