《Java2图形设计卷II:Swing》配套光盘源码

源代码在线查看: test.java

软件大小: 4504 K
上传用户: guigong
关键词: Java2 Swing 图形 光盘
下载地址: 免注册下载 普通下载 VIP

相关代码

				import java.awt.*;
				import javax.swing.*;
				
				public class Test extends JApplet {
					public Test() {
						Container contentPane = getContentPane();
						JLabel columnHeaderView = new JLabel(
											new ImageIcon("horizontalRuler.jpg",
														  "horizontal ruler"));
						JLabel rowHeaderView = new JLabel(
											new ImageIcon("verticalRuler.jpg",
														  "vertical ruler"));
						JLabel view = new JLabel(
											new ImageIcon("grapes.jpg",
														  "grapes"));
				
						JScrollPane sp = new JScrollPane(view);
				
						sp.setColumnHeaderView(columnHeaderView);
						sp.setRowHeaderView(rowHeaderView);
				
						sp.setViewportBorder(
										BorderFactory.createRaisedBevelBorder());
				
						contentPane.add(sp);
					}
				}
							

相关资源