You need to create a graphics from the buffered image and call paint() on your table view header to paint the header into the image. You'll need to translate the graphics context so the origin points to the header cell you want to paint. Then you can create a Picture from the buffered image and use that as your drag image.
On Aug 27, 2010, at 3:00 PM, JohnRodey wrote: > > So I guess drawing the component to a bufferedimage is where Im having some > issues. In the beginDrag method I create a Picture object to use as my > representation for the dragImage but it just is always a black image. > > int width = myTableView.getColumnBounds(index).width; > BufferedImage bImg = new BufferedImage(width, 100, > BufferedImage.TYPE_INT_RGB); > //I still need to find actual height, instead of hardcoded 100 > myTableView.getGraphics().drawImage(bImg, 0, 0, null); > Picture p = new Picture(bImg); > > Does anything look wrong with this? > -- > View this message in context: > http://apache-pivot-users.399431.n3.nabble.com/TableView-Column-Format-Question-tp1190306p1377166.html > Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
