diff --git a/src/share/classes/javax/swing/Painter.java b/src/share/classes/javax/swing/Painter.java
index ca9c214f3e6b8068885cc032505fd0a2c5b30f5d..7b2e3ef11effb9f841bd2f9b5edc6f4d3540b688 100644
--- a/src/share/classes/javax/swing/Painter.java
+++ b/src/share/classes/javax/swing/Painter.java
@@ -45,14 +45,16 @@ import java.awt.Graphics2D;
* Painter
that only works with subclasses of {@link java.awt.Component}.
* In that case, when the Painter
is declared, you may declare that
* it requires a Component
, allowing the paint method to be type safe. Ex:
- *
- * Painter p = new Painter() {
- * public void paint(Graphics2D g, Component c, int width, int height) {
- * g.setColor(c.getBackground());
- * //and so forth
- * }
+ *
+ * {@code
+ * Painter p = new Painter() {
+ * public void paint(Graphics2D g, Component c, int width, int height) {
+ * g.setColor(c.getBackground());
+ * //and so forth
* }
- *
+ * }
+ * }
+ *
*
* This interface makes no guarantees of threadsafety.
*