我想做一个按钮是 一个图片的形状 然后把图片放到上面去 怎么做啊?

解决方案 »

  1.   

    在图片上加超链接,超链接的onclick里写执行按钮的代码
    如<a href=# onclick="submitDate()"><img src="button1.jpg"></a>
      

  2.   

    我要的是在swing的里面  不是在网页里
      

  3.   

    JButton jButton1 = new JButton();
    aMni.setIcon(new ImageIcon("路径"));
     你试试
      

  4.   

    图片形状知道吗?重写contains()和paintComponent()方法, 重画Button吧.
      

  5.   

    jButton2.setIcon(CommonTool.createImageIcon("queryByPoint.gif",
                    "queryByPoint"));