Chosing text size and color

L

Lars Schouw

Does anyone know if there are some nice sample code showing how to
select text and color for my JPanel text?

I would like to let the user ba able to select which text font should
be shown and the color.

I guess that some kind of layout mannager can show my information in
the window when I resize this information as well as the window.

Thanks in advance
Lars Schouw
 
A

Andrew Thompson

Lars Schouw said:
Does anyone know if there are some nice sample code showing how to
select text and color for my JPanel text?

Start with the API docs.
Component.setFont()
 
N

nos

Be aware that there is a subset of colors that are
guaranteed to work on all screens and you should
restrict yourself to these. For example I had a Java
program that used two colors of blue, but my customer
said there was only one color on his machine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top