graphics context « Graphics « Java Swing Q&A





1. Modifying graphics context in Java    stackoverflow.com

I have a form that tries to modify a JComponent's graphics context. I use, for example,

((Graphics2D) target.getGraphics()).setStroke(new BasicStroke(5));
Now, immediately after I set the value and close the form, the change is ...

2. What's the best way of dealing with AWT Graphics contexts?    stackoverflow.com

Some users of our Swing application have reported weird artefacts appearing on the display. This ranges from components not repainting themselves properly for a second or two, right upto whole portions ...

3. what is a graphics context (In Java)?    stackoverflow.com

I have seen the term several times, what does it mean?

4. How do I paint a specific region of a component into a separate graphics context?    stackoverflow.com

What I'm trying to do is print the entire content of a component which requires painting the component into the graphics context that is given by a printing subroutine. What I ...