Deck 18: Swing II

ملء الشاشة (f)
exit full mode
سؤال
The method paint has one parameter of type:
(a)Shape
(b)Graphics
(c)Image
(d)String
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Icons can be added to:
(a)JLabels
(b)JButtons
(c)JMenuItems
(d)all of the above
سؤال
An invocation of the Container class method _____________ updates components on the screen.
(a)setVisible
(b)setLayout
(c)update
(d)validate
سؤال
Java uses a coordinate system whose origin point (0,0)is located at the upper-left corner of the screen area.
سؤال
If the policies for scroll bars are never set then the scroll bars will never be visible.
سؤال
An imaginary _____________ is used for drawing all shapes on the screen.
(a)bounding box
(b)view port
(c)container
(d)none of the above
سؤال
The Insets class is in the package ______________.
(a)java.awt
(b)javax.swing
(c)java.util
(d)java.lang
سؤال
When using scroll bars,the text is viewed through a ______________ that shows only part of the text at a time.
(a)view port
(b)text area
(c)all of the above
(d)none of the above
سؤال
All of the following are methods of the Graphics class except:
(a)drawRect
(b)fillRect
(c)coloredRect
(d)fill3DRect
سؤال
You can use the Java method ______________ from the Color class to change the drawing color.
(a)changeColor
(b)getColor
(c)setColor
(d)useColor
سؤال
The Graphics class is a(n)____________ class.
(a)discrete
(b)concrete
(c)abstract
(d)none of the above
سؤال
A view port shows only part of the text at one time.
سؤال
All of the following are methods of the class Color except:
(a)getRed
(b)brighter
(c)darker
(d)dimmer
سؤال
The dispose method of the JFrame class terminates a Java program.
سؤال
To by pass implementing all methods in the WindowListener interface,make the window listener a derived class of:
(a)WindowEvent
(b)ActionEvent
(c)WindowAdapter
(d)None of the above
سؤال
A window listener must define all the method headings in the WindowListener interface,even if some are trivial implementations.
سؤال
Any change to graphics being displayed on the screen requires a call to the method ____________ to update the graphics.
(a)paint
(b)repaint
(c)update
(d)all of the above
سؤال
The paint method of the Graphics class can only be used with Applets.
سؤال
The class JFrame has a method named __________ that eliminates the invoking JFrame without terminating the program.
(a)close
(b)dispose
(c)eliminate
(d)None of the above
سؤال
When the user clicks any of the three standard JFrame buttons,a ___________ is generated.
(a)window listener
(b)window event
(c)window activator
(d)window deactivator
سؤال
A rounded rectangle is a rectangle whose corners have been replaced by arcs.
سؤال
Write a Java statement that draws a filled oval at position (150,100)with a height of 100 and a width of 50.
سؤال
The class JColorChooser can be used to produce a dialog window that allows you to choose a color by looking at color samples.
سؤال
The Java Color class mixes amounts of red,green and yellow to produce any new color you might want.
سؤال
Write a Java statement that uses a Graphics object to display "Hello World" at position 50,100.
سؤال
The drawArc method of the Graphics class requires a starting angle.A positive starting angle indicates a clockwise direction.
سؤال
Write Java statements to add the icon created in number 1 above to a label that says "Love".
سؤال
Explain the Java coordinate system for graphic objects.
سؤال
Write a Java statement to create an image icon for the image heart.gif.
سؤال
Set policies for the scroll bar created in number 3 above.
سؤال
Write a Java statement to create a scroll pane for a text area named productDescription.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/31
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 18: Swing II
1
The method paint has one parameter of type:
(a)Shape
(b)Graphics
(c)Image
(d)String
B
2
Icons can be added to:
(a)JLabels
(b)JButtons
(c)JMenuItems
(d)all of the above
D
3
An invocation of the Container class method _____________ updates components on the screen.
(a)setVisible
(b)setLayout
(c)update
(d)validate
D
4
Java uses a coordinate system whose origin point (0,0)is located at the upper-left corner of the screen area.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
5
If the policies for scroll bars are never set then the scroll bars will never be visible.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
6
An imaginary _____________ is used for drawing all shapes on the screen.
(a)bounding box
(b)view port
(c)container
(d)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
7
The Insets class is in the package ______________.
(a)java.awt
(b)javax.swing
(c)java.util
(d)java.lang
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
8
When using scroll bars,the text is viewed through a ______________ that shows only part of the text at a time.
(a)view port
(b)text area
(c)all of the above
(d)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
9
All of the following are methods of the Graphics class except:
(a)drawRect
(b)fillRect
(c)coloredRect
(d)fill3DRect
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
10
You can use the Java method ______________ from the Color class to change the drawing color.
(a)changeColor
(b)getColor
(c)setColor
(d)useColor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
11
The Graphics class is a(n)____________ class.
(a)discrete
(b)concrete
(c)abstract
(d)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
12
A view port shows only part of the text at one time.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
13
All of the following are methods of the class Color except:
(a)getRed
(b)brighter
(c)darker
(d)dimmer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
14
The dispose method of the JFrame class terminates a Java program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
15
To by pass implementing all methods in the WindowListener interface,make the window listener a derived class of:
(a)WindowEvent
(b)ActionEvent
(c)WindowAdapter
(d)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
16
A window listener must define all the method headings in the WindowListener interface,even if some are trivial implementations.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
17
Any change to graphics being displayed on the screen requires a call to the method ____________ to update the graphics.
(a)paint
(b)repaint
(c)update
(d)all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
18
The paint method of the Graphics class can only be used with Applets.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
19
The class JFrame has a method named __________ that eliminates the invoking JFrame without terminating the program.
(a)close
(b)dispose
(c)eliminate
(d)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
20
When the user clicks any of the three standard JFrame buttons,a ___________ is generated.
(a)window listener
(b)window event
(c)window activator
(d)window deactivator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
21
A rounded rectangle is a rectangle whose corners have been replaced by arcs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
22
Write a Java statement that draws a filled oval at position (150,100)with a height of 100 and a width of 50.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
23
The class JColorChooser can be used to produce a dialog window that allows you to choose a color by looking at color samples.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
24
The Java Color class mixes amounts of red,green and yellow to produce any new color you might want.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
25
Write a Java statement that uses a Graphics object to display "Hello World" at position 50,100.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
26
The drawArc method of the Graphics class requires a starting angle.A positive starting angle indicates a clockwise direction.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
27
Write Java statements to add the icon created in number 1 above to a label that says "Love".
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
28
Explain the Java coordinate system for graphic objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
29
Write a Java statement to create an image icon for the image heart.gif.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
30
Set policies for the scroll bar created in number 3 above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
31
Write a Java statement to create a scroll pane for a text area named productDescription.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.