I want to draw a string that I take from a jtextarea, but I want to draw with 20px space to each letter, but I think I can't do this with drawstring and I can't draw a char per time with drawchars, so what can I do?
I want to write a letter above each trace, but how I'm doing know is not working
public void paintComponent(Graphics g)
{
super.paintComponent(g);
for(int i=0;i<PalavraAdivinha.length();i++)
{
g.fillRect(InicioTraco+(i*40), 240, 40, 5);
}
Font titulo = new Font("Arial",Font.BOLD,40);
g.setFont(titulo);
g.drawString("Adivinhe a palavra", 0,100 );
if(PalavraDigitada != null)
{
g.drawString(PalavraDigitada, InicioTraco, 235);
}
}