>520 こんな風に実装しました。必要なimportは省略します。

class hoge{
  JPanel p
  Jbutton btn

  public hoge{
   btn = new JButton("click");
   p = new JPanel();
   setBounds( 10, 10, 1100, 1100);
   p.add(btn);
   p.setLayout(null);
   btn.addActionListener(new ActionListener()
   {
   =@ public void actionPerformed(ActionEvent event){
       *****
     }
   });
getContentPane().add(p);
}

   public static void main(String args[]){
     hoge tr = new hoge();
   }
}
ここで*****に実装してclickが押されたら図形drawLineとかで描画したいです!!
こんな風にできませんか?