Deck 22: GUI
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/26
العب
ملء الشاشة (f)
Deck 22: GUI
1
A JFrame supports three operations when the user closes the window. Which of the choices below is not one of the three:
A) DISPOSE_ON_CLOSE.
B) DO_NOTHING_ON_CLOSE.
C) LOWER_ON_CLOSE.
D) HIDE_ON_CLOSE.
A) DISPOSE_ON_CLOSE.
B) DO_NOTHING_ON_CLOSE.
C) LOWER_ON_CLOSE.
D) HIDE_ON_CLOSE.
C
2
What happens if setSize is not called on a window?
A) The window is displayed at its preferred size.
B) It is a syntax error.
C) The window is not displayed.
D) Only the title bar appears.
A) The window is displayed at its preferred size.
B) It is a syntax error.
C) The window is not displayed.
D) Only the title bar appears.
D
3
JSliders generate what type of event?
A) ActionEvents.
B) ChangeEvents.
C) WindowEvents.
D) MouseEvents.
A) ActionEvents.
B) ChangeEvents.
C) WindowEvents.
D) MouseEvents.
B
4
In a multiple-document interface (MDI), a JDesktopPane is the parent window and what class is the child window?
A) JChild.
B) JInternalFrame.
C) JChildWindow.
D) JFrame.
A) JChild.
B) JInternalFrame.
C) JChildWindow.
D) JFrame.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
5
Which of the following is not one of the seven methods for handling window events?
A) windowClosing.
B) windowClosed.
C) windowOpening.
D) windowOpened.
A) windowClosing.
B) windowClosed.
C) windowOpening.
D) windowOpened.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
6
Which of the choices below do not complete the following sentence correctly?
A _________ is a ___________.
A) JMenuBar, JComponent.
B) JMenuItem, AbstractButton.
C) JMenu, JMenuItem.
D) JRadioButtonMenuItem, JMenu.
A _________ is a ___________.
A) JMenuBar, JComponent.
B) JMenuItem, AbstractButton.
C) JMenu, JMenuItem.
D) JRadioButtonMenuItem, JMenu.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which statement below is false?
A) Each JPopupMenu should be associated with its own component.
B) Local variables must be declared static to be used in an anonymous inner class declaration.
C) The JPopupMenu show method specifies the origin component, and the coordinates at which the JPopupMenu should display on the component.
D) None of the above.
A) Each JPopupMenu should be associated with its own component.
B) Local variables must be declared static to be used in an anonymous inner class declaration.
C) The JPopupMenu show method specifies the origin component, and the coordinates at which the JPopupMenu should display on the component.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
8
Which of the following is not a look-and-feel?
A) Windows.
B) Motif.
C) Metal.
D) None of the above.
A) Windows.
B) Motif.
C) Metal.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
9
By default, the tabs on a JTabbedPane appear at the:
A) top.
B) bottom.
C) left.
D) right.
A) top.
B) bottom.
C) left.
D) right.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
10
The first argument to method showMessageDialog specifies ________.
A) the title.
B) the message.
C) the icon.
D) the parent window.
A) the title.
B) the message.
C) the icon.
D) the parent window.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
11
Which of the following is not a Java AWT portability issue?
A) GUI components that have different looks on different platforms may use different amounts of space.
B) GUI components may have different default functionality.
C) Different platforms may have different representations of integers.
D) All of the above.
A) GUI components that have different looks on different platforms may use different amounts of space.
B) GUI components may have different default functionality.
C) Different platforms may have different representations of integers.
D) All of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
12
Arrow keys can manipulate a JSlider object. Which of the following statements does not correctly describe how the arrow keys are used?
A) The left-arrow and right arrow keys decrease or increase (respectively) the thumb of the JSlider by 1.
B) The down-arrow and up-arrow keys decrease or increase (respectively) the thumb of the JSlider by 1.
C) The PgDn and PgUp keys decrease or increase (respectively) by block increments of one-tenth of the range of values.
D) The Home key and End key move the thumb to the maximum or minimum (respectively) value of the JSlider.
A) The left-arrow and right arrow keys decrease or increase (respectively) the thumb of the JSlider by 1.
B) The down-arrow and up-arrow keys decrease or increase (respectively) the thumb of the JSlider by 1.
C) The PgDn and PgUp keys decrease or increase (respectively) by block increments of one-tenth of the range of values.
D) The Home key and End key move the thumb to the maximum or minimum (respectively) value of the JSlider.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
13
Which of the following is false?
A) JFrame is a lightweight component.
B) JFrame is a subclass of Frame (which is a subclass of Window).
C) JFrames have a title bar and a border.
D) A JFrame window will look like all other windows displayed on that platform.
A) JFrame is a lightweight component.
B) JFrame is a subclass of Frame (which is a subclass of Window).
C) JFrames have a title bar and a border.
D) A JFrame window will look like all other windows displayed on that platform.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
14
Which of the following is not a class UIManager method?
A) LookAndFeelInfo().
B) getInstalledLookAndFeels().
C) setLookAndFeel().
D) getLookAndFeel().
A) LookAndFeelInfo().
B) getInstalledLookAndFeels().
C) setLookAndFeel().
D) getLookAndFeel().
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
15
Mnemonics can be used with all subclasses of which class?
A) AbstractButton.
B) JMenu.
C) JMenuItem
D) JComponent.
A) AbstractButton.
B) JMenu.
C) JMenuItem
D) JComponent.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
16
A JTabbedPane
A) arranges GUI components into layers such that only one layer is visible at a time.
B) allows users to access a layer of GUI components via a tab.
C) extends JComponent.
D) All of the above.
A) arranges GUI components into layers such that only one layer is visible at a time.
B) allows users to access a layer of GUI components via a tab.
C) extends JComponent.
D) All of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
17
Which method returns true if the popup trigger event occurred?
A) isTrigger.
B) isPopup.
C) isPopupTrigger.
D) isTriggerEvent.
A) isTrigger.
B) isPopup.
C) isPopupTrigger.
D) isTriggerEvent.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
18
Menus are attached to windows by calling method ________.
A) addMenuBar.
B) setJMenuBar.
C) setMenu.
D) addJMenuBar.
A) addMenuBar.
B) setJMenuBar.
C) setMenu.
D) addJMenuBar.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
19
Which constructor below creates a JInternalFrame that is resizable, closable, maximizable, and minimizable?
A) JInternalFrame frame = new JInternalFrame("Internal Frame", true, true, true, true);
B) JInternalFrame frame = new JInternalFrame("Internal Frame", true, true, false, true);
C) JInternalFrame frame = new JInternalFrame("Internal Frame", true, true, true, false);
D) JInternalFrame frame = new JInternalFrame("Internal Frame", false, false, true, true);
A) JInternalFrame frame = new JInternalFrame("Internal Frame", true, true, true, true);
B) JInternalFrame frame = new JInternalFrame("Internal Frame", true, true, false, true);
C) JInternalFrame frame = new JInternalFrame("Internal Frame", true, true, true, false);
D) JInternalFrame frame = new JInternalFrame("Internal Frame", false, false, true, true);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
20
A JSlider cannot display which of the following:
A) Major tick marks.
B) Minor tick marks labels.
C) Minor tick marks.
D) Snap-to ticks.
A) Major tick marks.
B) Minor tick marks labels.
C) Minor tick marks.
D) Snap-to ticks.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
21
What GridBagConstraints constants can be used in place of gridx and gridy?
A) RELATIVE and REMAINDER.
B) CENTER and BOTH.
C) NORTH and SOUTH.
D) FILL and NONE.
A) RELATIVE and REMAINDER.
B) CENTER and BOTH.
C) NORTH and SOUTH.
D) FILL and NONE.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
22
To create a fixed space between all components using BoxLayout, use the method ________.
A) createVerticalStrut()
B) createHorizontalStrut()
C) createGlue()
D) createRigidArea()
A) createVerticalStrut()
B) createHorizontalStrut()
C) createGlue()
D) createRigidArea()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
23
Which of the following GridBagConstraints specifies the number of columns a component will occupy?
A) gridwidth.
B) gridheight.
C) weightx.
D) weighty.
A) gridwidth.
B) gridheight.
C) weightx.
D) weighty.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
24
What is the default value for the GridBagConstraint fill?
A) NONE.
B) BOTH.
C) CENTER.
D) HORIZONTAL.
A) NONE.
B) BOTH.
C) CENTER.
D) HORIZONTAL.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
25
To evenly distribute fixed-size components in a row using BoxLayout, use the method ________.
A) createVerticalStrut()
B) createHorizontalStrut()
C) createVerticalGlue()
D) createHorizontalGlue()
A) createVerticalStrut()
B) createHorizontalStrut()
C) createVerticalGlue()
D) createHorizontalGlue()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck
26
The GridBagContraints constant RELATIVE means that ________.
A) the component is the last component.
B) the component is the next to last component.
C)
C) the component should be placed relative to the previous component.
D) Both b and
A) the component is the last component.
B) the component is the next to last component.
C)
C) the component should be placed relative to the previous component.
D) Both b and
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 26 في هذه المجموعة.
فتح الحزمة
k this deck