• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

printing: Graphics.copyArea() not implemented?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I'm attempting to enable printing of a JPanel that contains a mixture
of Swing and Java2D components.
In the JPanel->print method I have have code that seems to correctly calculate the portion of the JPanel that should be printed on a given call.
Now, for the broken/failing part...drawing the appropriate portion of the JPanel into the proper place in the Graphics context in the "print" method (g below).
paintComponent(g);
//next line should copy the page of interest to 0,0 in g
g.copyArea(startX, startY, imageWidth, imageHeight, -startX, -startY);
The copyArea (JVM 1.4.2) fails with the following:
java.lang.InternalError: transformed copyArea not implemented yet
So, the question is...is this a valid approach? Other suggestions to accomplish the goal?
Thanks in advance.
rd
 
A teeny tiny vulgar attempt to get you to buy our stuff
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic