-
Helo with Graphics
hello,
I want to send a string to the method paint from the main
Code:
class Board extends JFrame
{
public void showTurn(Graphics g,String playerName)
{}}
inside the method I want to draw the string, but I don't know how to send both of the variables to the method..(Don't know how to send the Graphics g).
Thanks :)
-
-
Also
Lesson: Performing Custom Painting (The Java™ Tutorials > Creating a GUI With JFC/Swing)
Note that custom painting is NOT done in a JFrame but rather in a JComponent/JPanel that is added to the frame.
db