Yo - im making an animation which draws a string to a panel and moves it once the class is loaded. This all works fine but I want to change the colour of the string to white, the background will be black by the way, as well as make it bold and italic.
I've tried using HTML tags, which work on the other strings i have created. I also tried using a JLabel, which works but I can't draw a component using:
Graphics2D g2d = (Graphics2D) g;
g2d.drawString( text, textX, textY );
g2d doesn't contain a draw component option. So what are my options?
Also how do I specify a components position, I used the setBounds() method as well as the setLocation() method, neither worked. Does it matter that it was within a JPanel?
Cheers