line Drawing in java

后端 未结 3 717
花落未央
花落未央 2021-01-28 18:04

There are number of problems with this code

public class LineEx extends JFrame implements MouseMotionListener,MouseListener{
    int x1,y1,x2,y2;
    public Line         


        
3条回答
  •  闹比i
    闹比i (楼主)
    2021-01-28 18:49

    1. The source could be insets of JLabel's border.
    2. You have the visible rect. Add visible rect x and y to your basic coordinates.

提交回复
热议问题