我在做个聊天程序,想实现发送表情功能,现在我想根据接到的文件名,从本地取出文件,并显示在JTextArea 里,那图片该怎么显示啊?在线等  我的代码是这样的
 if(msg.startsWith("x0")&&msg.endsWith("gif"))//判断是不是表情图片
               {
                File _file = new File(msg); //根据文件名读入文件
                Image src = javax.imageio.ImageIO.read(_file);
                int wideth=src.getWidth(null); //得到源图宽
                int height=src.getHeight(null); //得到源图长                 BufferedImage tag = new BufferedImage(wideth,height,BufferedImage.TYPE_INT_RGB);
                Graphics g = tag.getGraphics();
                g.drawImage(src,0,0,wideth,height,null); 
下面该怎么办啊?请说详细点  马上送分!