绘制lanelist';java中笛卡尔坐标系中的s成员

绘制lanelist';java中笛卡尔坐标系中的s成员,java,drawing,Java,Drawing,我想在笛卡尔坐标系中画一个lanelist的成员。但某些车道(包括X和Y轴)轴不显示。谢谢你的帮助 public class Paint extends JPanel { public void paintComponent(Graphics g) { super.paintComponent(g); this.setBackground(Color.BLACK); g.setColor(Color.orange); g.drawLine(0, -10000

我想在笛卡尔坐标系中画一个lanelist的成员。但某些车道(包括X和Y轴)轴不显示。谢谢你的帮助

public class Paint extends JPanel {

public void paintComponent(Graphics g) {

    super.paintComponent(g);
    this.setBackground(Color.BLACK);

    g.setColor(Color.orange);
    g.drawLine(0, -10000, 0, 10000);// Y coordinate definition

    g.setColor(Color.orange);
    g.drawLine(-10000, 0, 10000, 0);// // X coordinate definition

     for (int i1 = 0; i1 < Lanelist.size(); i1++) {// drawing lanes in the lanelist
        int x1;
        int y1;
        int x2;
        int y2;

        x1 = (int) Math.round(Lanelist.get(i1).origNode.x);
        y1 = (int) Math.round(Lanelist.get(i1).origNode.y);
        x2 = (int) Math.round(.Lanelist.get(i1).destNode.x);
        y2 = (int) Math.round(Lanelist.get(i1).origNode.y);

        g.setColor(Color.white);
        g.drawLine(x1, y1, x2, y2);
    }
 }
}

根据您的示例,没有任何东西可以绘制,事实上,它不会编译。考虑提供一个说明你的问题的方法。这不是一个代码转储,而是您正在做的一个示例,它突出了您所遇到的问题。这将减少混乱和更好的响应。别忘了包括可用于复制问题的数据,谢谢您的帮助。事实上,它确实如此,但并不是它的每一部分(只画一条或两条车道)。我的物流课(主要)比我在这里讲的要大得多。我没有把我的代码的其他部分放在这里,因为我认为我的问题的来源与它们无关。
public static void main(String[] args) throws IloException {

 JFrame f2=new JFrame("Title");;
 f2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 Paint pl=new Paint();
 f2.setSize(99999, 99999);
 f2.setVisible(true);

 f2.add(pl);
}
}