TestImagePage.java
package com.testimage;
import wicket.markup.html.WebPage;
import wicket.markup.html.image.resource.RenderedDynamicImageResource;
import wicket.markup.html.image.Image;
import java.awt.Graphics2D;
public class TestImagePage extends WebPage {
public TestImagePage() {
add( new Image("cross", new RenderedDynamicImageResource(100, 100)
{
protected boolean render(Graphics2D graphics)
{
graphics.drawLine( 0, 0, 20, 20 );
graphics.drawLine( 0, 20, 20, 0 );
return true;
}
}));
}
}
TestImagePage.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket=" http://wicket.sourceforge.net/"
xml:lang="en"
lang="en">
<head>
<title>Test Dynamic Image</title>
</head>
<body>
<img wicket:id="cross"/>
</body>
</html>
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user