import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class Game4 extends JPanel {
public Game4() {
setVisible(true);
}
public void paint(Graphics g) {
Graphics2D twoD = (Graphics2D) g;
boxes(twoD);
}
public void boxes(Graphics2D twoD) {
twoD.drawLine(getWidth() / 3, 0, getWidth() / 3, getHeight());
}
}
For some reason, I can't get this code to draw out. I'm not that good with Graphics2D so if I could get some help that would be great.