Drawing a JPanel to a BufferedImage, unexpected results
I'm building a node-based editor. Effectively it's Swing components on a giant carpet, connected with lines to denote relationships and flow of data. To achieve this I have my VisibleFrame with my Donatello JPanel that does the custom rendering. Donatello gets the Swing component of items in the view area, and then draws it like this:
Somehow Donatello is showing panel twice - once at my desired position and once in the top left corner. But I'm never connecting panel to Donatello, or frame to Donatello, so I'm not sure how this is possible. If I comment out
Somehow Donatello is showing panel twice - once at my desired position and once in the top left corner. But I'm never connecting panel to Donatello, or frame to Donatello, so I'm not sure how this is possible. If I comment out
panel.paint(g2d) both disappear. Anyone have a hint for me?