实现翻页
//源文件名:
//在下载源程序中的文件夹:0709相册
import .*;
import .*;
import .*;
public class album extends Applet implements ActionListener
{
Image img[];
int j=0;
String f;
Label a1=new Label("文件名:");
Label a2=new Label(" ");
Button btn1,btn2;
public void init()
{
img = new Image[22];
setLayout(null);
setBackground();
add(a1);
add(a2);
btn1= new Button("下一页");
btn2= new Button("上一页");
add(btn1);
add(btn2);
(650,60,60,30);
(650,80,110,60);
(650,80,110,60);
();
();
();
Font ft = new Font("Times New Romon",1,20);
(ft);
(650,180,60,30);
(650,240,60,30);
(this);
(this);
for (int i=0;i<22;i++)
{
f="pic"+(i)+".jpg";
img[i]=getImage(getCodeBase(),f);
}
java 程序源代码 来自淘豆网m.daumloan.com转载请标明出处.