Skip to content

Commit a8bfabe

Browse files
committed
Do not use new Color(display,...) in docs
Adjust docs to not recommend what is discussed to be deprecated and is totally not needed. Contributes to eclipse-platform/eclipse.platform.swt#3233 .
1 parent 0238046 commit a8bfabe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • eclipse.platform.common/bundles/org.eclipse.platform.doc.isv/guide

eclipse.platform.common/bundles/org.eclipse.platform.doc.isv/guide/swt_graphics.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ <H4>Disposal</H4>
190190
shell.addPaintListener (new PaintListener () {
191191
public void paintControl (PaintEvent event) {
192192
GC gc = event.gc;
193-
Color red = new Color (event.widget.getDisplay (), 0xFF, 0, 0);
193+
Color red = new Color (0xFF, 0, 0);
194194
gc.setForeground (red);
195195
Rectangle rect = event.widget.getClientArea ();
196196
gc.drawRectangle (rect.x + 10, rect.y + 10, rect.width - 20, rect.height - 20);

0 commit comments

Comments
 (0)