Helo with Graphics
I want to send a string to the method paint from the main
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).
class Board extends JFrame
public void showTurn(Graphics g,String playerName)
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.