Hello All!
 
Interesting bug? here, I am using a JTextPane for styled text and am calling
it's paint() method and passing a Graphics object to it to paint itself onto.
 
This works well with other Graphics objects, ie Screen, BufferedImage, Print, etc.
 
But when I pass it a PdfGraphics2D object it always wants to be painted on the top.
 
ie:
 
JTextPane t = new JTextPane();
t.setText("hello world - hello world ");
t.setSize(300,300);
t.setLocation(75,75);
t.setVisible(true);
t.setOpaque(false);
t.paint(g2);
 
g2.setColor(Color.GREEN);
g2.fillRect(50,0,25,25);
 
This code will paint the JTextPane on top of the rectangle.
 
If anybody has any bright ideas, I would be greatful.
 
Bill Ensley
Bear Printing
 
 

Reply via email to