I'm having trouble drawing simple graphics.
This is
in my Shuffleboard class
Board board = new Board("Shuffleboard");
board.setLocation(100, 100);
board.setResizable(false);
board.setVisible(true);
This is
in my Board class
boardCanvas = new BoardCanvas();
this.add(boardCanvas);
This is
in my BoardCanvas class
super.paintComponent(g);
g.setColor(Color.black);
for (Weight w : weights){
g.fillOval(200, 200, 50, 50);
//g.drawString("Test", 100, 100);
System.out.println("Bleh");
}
I know its executing because it is printing Bleh to the console. But no oval is being drawn. There appears to be no error.
My BoardCanvas class extends JPanel - and my Shuffleboard class extends JFrame. Would this be an issue?
Any help is appreciated,
Lang