Results 1 to 1 of 1
Thread: JTable image
- 02-09-2010, 08:05 AM #1
Member
- Join Date
- Oct 2009
- Posts
- 88
- Rep Power
- 0
JTable image
Hi am able to generate an image of jtable but i want it with header
Java Code:// TODO add your handling code here: try { BufferedImage buffy = new BufferedImage(this.jTable1.getWidth(),this.jTable1.getHeight(),java.awt.image.BufferedImage.TYPE_INT_RGB); Graphics g = buffy.getGraphics(); this.jTable1.paint(g); String path=System.getProperty("user.dir"); path+="\\1.png"; OutputStream out=new FileOutputStream(path); JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); JPEGEncodeParam param =encoder.getDefaultJPEGEncodeParam(buffy); encoder.getDefaultJPEGEncodeParam(buffy); param.setQuality(1.0f, false); encoder.setJPEGEncodeParam(param); encoder.encode(buffy); }catch(Exception e) { e.printStackTrace(); }
Similar Threads
-
Adding New JTable in JTable
By anilkumar_vist in forum New To JavaReplies: 0Last Post: 01-27-2010, 08:27 AM -
Problems drawing a section of an image onto another image.
By Cain in forum Java 2DReplies: 1Last Post: 04-17-2009, 12:44 AM -
[SOLVED] manipulating the pixel values of an image and constructinf a new image from
By sruthi_2009 in forum AWT / SwingReplies: 14Last Post: 04-10-2009, 08:46 AM -
Jtable duplicates through Hashtable (JTable condition problem) my assignment plz help
By salmanpirzada1 in forum Advanced JavaReplies: 2Last Post: 05-15-2008, 10:15 AM -
Converting multiple banded image into single banded image... Image enhancement
By archanajathan in forum Advanced JavaReplies: 0Last Post: 01-08-2008, 05:29 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks