Skip to content

Commit

Permalink
7032376: A type parameter isn't seen by using an web browser
Browse files Browse the repository at this point in the history
Reviewed-by: malenkov
  • Loading branch information
rupashka committed Apr 13, 2011
1 parent 85d2faf commit bf0116f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/share/classes/javax/swing/Painter.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,16 @@
* <code>Painter</code> that only works with subclasses of {@link java.awt.Component}.
* In that case, when the <code>Painter</code> is declared, you may declare that
* it requires a <code>Component</code>, allowing the paint method to be type safe. Ex:
* <pre><code>
* Painter<Component> p = new Painter<Component>() {
* public void paint(Graphics2D g, Component c, int width, int height) {
* g.setColor(c.getBackground());
* //and so forth
* }
* <pre>
* {@code
* Painter<Component> p = new Painter<Component>() {
* public void paint(Graphics2D g, Component c, int width, int height) {
* g.setColor(c.getBackground());
* //and so forth
* }
* </code></pre></p>
* }
* }
* </pre></p>
*
* <p>This interface makes no guarantees of threadsafety.</p>
*
Expand Down

0 comments on commit bf0116f

Please sign in to comment.