如:
<form
action="some.do"
method="post">
用户:<input
name="username"
type="text">
密码:<input
name="password"
type="password">
<input
type="submit"
value="提交"
style="background-image:url(bg.gif)">
</form>
bg.gif就是你的图片,如果图片上有登录两个字,value属性就不需要了,设置一下button的高宽就可以实现图片按钮的效果了。
下面一种也可以
<form
action="example.cgi"
method="post">
<input
type="text"
name="login">
<br>
<input
type="image"
src="submit.gif">
<input
type="image"
src="reset.gif">
</form>
Icon icon=new ImageIcon("image/inter.jpg")Button1.setIcon(icon)
("image/inter.jpg")是文件地址,一般是在你的工程的文件下面新建个文件夹专门放图片,我的文件夹是image