• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AWT...Jxam Mock Questions

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
Some questions are troubling me from Jxam
Q[1]
You construct a List by calling List(5, false).
Which statements below are correct (assume the layout managers do not modify the List properties).
1: The list supports multiple selection. //false
2: The list has 5 visible items. //true
3: A vertical scroll bar will be added automatically if needed. //???
4: The code fails to compile. The given constructor is not a valid one.// false
Given ans: 2
my answer : 2 & 3
I just tried out the program added six items to the list and a scrollbar is added to the list but in the Jxam's explanation they have mentioned explicitly that scroll bars are not added to Lists.

Q[2]
True or false.
Only Frames can contain menu bars or pull-down menus.
1.True
2: False.
answer given 2 i.e false
but i think it is true
Please explain.
Thanx in adv
Amit
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You get the scrollbar for free as you found out! It is "scrolling" List.
Frame.setMenuBar() is the only method to add menubars.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Popup menu can be added to any component.
Menu bars can only be added to Frames.
reply
    Bookmark Topic Watch Topic
  • New Topic