A Programmer's question about net beans's graphic reflection ! Why it doesn't reflect it like a mirror ? i tried everything!?.?

public void paintComponent(Graphics g){ super.paintComponent(g); Graphics2D g2=(Graphics2D) g; { Font f1 = new Font(Font.SERIF, Font.BOLD, 60); g2.setFont(f1); //g2.drawString("Hello TM240", 20, 80); FontRenderContext frc = g2.getFontRenderContext(); GlyphVector gv = f1.createGlyphVector(frc, "Hello... show more public void paintComponent(Graphics g){
super.paintComponent(g);
Graphics2D g2=(Graphics2D) g;
{
Font f1 = new Font(Font.SERIF, Font.BOLD, 60);
g2.setFont(f1);
//g2.drawString("Hello TM240", 20, 80);
FontRenderContext frc = g2.getFontRenderContext();
GlyphVector gv = f1.createGlyphVector(frc, "Hello TM240");
Shape glyph = gv.getOutline(20,80);
g2.setClip(glyph);
g2.setColor(Color.blue);
for (int i = 0; i< 2000; i++)
{
Shape shape=new Line2D.Double(Math.random()*500,Math.ran...
g2.draw(shape);
}
AffineTransform transform = new AffineTransform();
transform.setTransform(-1,0,0,1,0,0);
Shape shape1 = transform.createTransformedShape(glyph);
g2.draw(shape1);
}
}
}
1 answer 1