怎样用java绘制弧形文字

怎样用java绘制弧形文字呢,就像印章上的那样,然后保存到一张图片里
[b]问题补充:[/b]
[code="java"]public class Test{
public static void main(String[]args) throws Exception...{

    //1.jpg是你的 主图片的路径
     InputStream is = new FileInputStream("1.jpg");


    //通过JPEG图象流创建JPEG数据流解码器
     JPEGImageDecoder jpegDecoder = JPEGCodec.createJPEGDecoder(is);
    //解码当前JPEG数据流,返回BufferedImage对象
     BufferedImage buffImg = jpegDecoder.decodeAsBufferedImage();
    //得到画笔对象
     Graphics g = buffImg.getGraphics();

    //创建你要附加的图象。
     //2.jpg是你的小图片的路径
     ImageIcon imgIcon = new ImageIcon("2.jpg"); 

    //得到Image对象。
     Image img = imgIcon.getImage();

    //将小图片绘到大图片上。
     //5,300 .表示你的小图片在大图片上的位置。
     g.drawImage(img,5,330,null);

    //设置颜色。
     g.setColor(Color.BLACK);

    //最后一个参数用来设置字体的大小
     Font f = new Font("宋体",Font.BOLD,30);
    g.setFont(f);

    //10,20 表示这段文字在图片上的位置(x,y) .第一个是你设置的内容。
     g.drawString("默哀555555。。。。。。。",10,30);
    g.dispose();

    OutputStream os = new FileOutputStream("union.jpg");
    //创键编码器,用于编码内存中的图象数据。
     JPEGImageEncoder en = JPEGCodec.createJPEGEncoder(os);
    en.encode(buffImg);
    is.close();
    os.close();
    System.out.println ("合成结束。。。。。。。。");
}    

}[/code]

我已经可以在panel上实现我想要的功能,不知道能不能把panel上东东保存为图片呢

[quote]我已经可以在panel上实现我想要的功能,不知道能不能把panel上东东保存为图片呢 [/quote]
你的意思是不是在这个Panel里插入背景图片阿
[code="java"]
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class JpanelBackGround extends JFrame{
public JpanelBackGround(){
super("Java.swing.Timer类测试");
Animater animator = new Animater();
animator.setOpaque(true);
animator.setBackground(Color.white);
setContentPane(animator);
JLabel lab=new JLabel("图片显示",JLabel.CENTER);
animator.add(lab);
this.setSize(220, 300);
this.setVisible(true);
this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
}

public static void main(String args[]){
new time();
}
}

//给JPanel加入图片
class Animater extends JPanel{
Animater(){
super(new BorderLayout());
}
protected void paintComponent(Graphics g){
super.paintComponent(g);
ImageIcon img=new ImageIcon("E:\2.jpg");
img.paintIcon(this, g, 0, 0);
}
}

[/code]

[quote]用java绘制弧形文字[/quote]
这个不是很清楚,不知道是否通过改变字体来实现

[quote]保存到一张图片里[/quote]
[code="java"]
public class Test{
public static void main(String[]args) throws Exception...{

    //1.jpg是你的 主图片的路径
     InputStream is = new FileInputStream("1.jpg");


    //通过JPEG图象流创建JPEG数据流解码器
     JPEGImageDecoder jpegDecoder = JPEGCodec.createJPEGDecoder(is);
    //解码当前JPEG数据流,返回BufferedImage对象
     BufferedImage buffImg = jpegDecoder.decodeAsBufferedImage();
    //得到画笔对象
     Graphics g = buffImg.getGraphics();

    //创建你要附加的图象。
     //2.jpg是你的小图片的路径
     ImageIcon imgIcon = new ImageIcon("2.jpg"); 

    //得到Image对象。
     Image img = imgIcon.getImage();

    //将小图片绘到大图片上。
     //5,300 .表示你的小图片在大图片上的位置。
     g.drawImage(img,5,330,null);

    //设置颜色。
     g.setColor(Color.BLACK);

    //最后一个参数用来设置字体的大小
     Font f = new Font("宋体",Font.BOLD,30);
    g.setFont(f);

    //10,20 表示这段文字在图片上的位置(x,y) .第一个是你设置的内容。
     g.drawString("默哀555555。。。。。。。",10,30);
    g.dispose();

    OutputStream os = new FileOutputStream("union.jpg");
    //创键编码器,用于编码内存中的图象数据。
     JPEGImageEncoder en = JPEGCodec.createJPEGEncoder(os);
    en.encode(buffImg);
    is.close();
    os.close();
    System.out.println ("合成结束。。。。。。。。");
}    

}

[/code]