Just The last

  just the last
  when I look back
  before I say goodbye
   do you
   take me around
as the night
  just the last
  before I look forword
I bursting into tears  when  watching casablance
  just as the yesterday
  the last singing
  a rocky moonlight in my eyes

                                                           ( 忽然发现用英语写诗歌,也别有一番滋味在心头)

                                   正如最后一次

                                     蓦然回首

说再见

是否会引领我

今夜何等温馨

遥望远方

正如昨夜

流着泪看卡萨布兰卡

最后一支歌

我的眼里映着摩洛哥的月光

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
代码We now want to always redraw all the points that have ever been drawn in the panel, not just the last point. To do this, we must save the coordinates of all these points so that we can redraw them all one by one in the paintComponent method every time this method is called. To save the coordinates of the various mouse positions we click, replace the x and y instance variables of the MyPanel class with a single private instance variable called points of type ArrayList<Point>. The Point class is provided to you by Swing. In the constructor of MyPanel, initialize the points instance variable with a new arraylist object of the same type. In the mouseClicked method of the mouse listener, use the getPoint method of the mouse event object to get a Point object representing the position of the mouse click (that Point object internally stores both the x and y coordinates of the mouse click event). Then add this Point object to the arraylist using the arraylist’s add method. Then, in the paintComponent method, add a loop to draw in the panel all the points of the arraylist. You can get the number of elements in the arraylist by using the size method of the arraylist; you can access a specific element of the arraylist at index i by using the get(i) method of the arraylist (element indexes start at zero in an arraylist). The Point class has getX and getY methods to get the coordinates of the point (these two methods return values of type double so you need to cast the returned values into the int type before you can use them to draw a point).
05-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值