Mastering Java 2025 – 400 Free Practice Questions to Pass the 'Thinking in Java' Exam

Question: 1 / 510

What kind of graphics object is used to draw lines in a SWT scribble application?

Canvas

PaintBrush

The correct answer is B. In SWT scribble applications, PaintBrushes are used to draw lines because they allow for the creation and customization of strokes with different colors, widths, and styles. Canvases (A) are used to create and manipulate graphical objects, but they do not have the ability to draw lines. GCs (C) are the graphics context objects that are responsible for drawing graphics, but they are not used specifically for drawing lines in SWT scribble applications. Drawables (D) are abstract objects used to represent graphical objects, but they are also not used for drawing lines in this type of application. Therefore, the most appropriate answer is B, PaintBrush.

Get further explanation with Examzify DeepDiveBeta

GC

Drawable

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy