This section illustrates you how to show the textured text.
Texture refers to the roughness of the smoothness of a work of art. The way in which you paint involves texture. A texture is a bitmap image applied to the surface in computer graphics. We can also fill our graphics shapes with textures.
We are providing you an example that will show the textured text. The BufferedImage data is copied by the TexturePaint object. The method getTextureImage() get the texture image. The class TexturePaint provides an impressive way to fill a shape with a repeating pattern. The Font class defines the font. The method bufferedImage.createGraphics() draw the graphics into the BufferedImage. Using setPaint() method, different colors are defined to show the texture..
Here is the code of TextTexturedExample.java
Output will be displayed as:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: October 11, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles