• 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

Graphics object

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Q55.[Check all correct answers]
The paint method of a Component is called with a reference to a Graphics object.Which of the following statements about the Graphics object are true ?
(a)You can draw anywhere on the screen with the Graphics object .
(b)The Graphics object has a foreground and a background color associated with it.
(c)The Graphics object has a reference to the default font for the component.
(d)The Graphics object will refer to an instance of the java.awt.Graphics2D.
The answers mentioned were (c) & (d).Should'nt (a) be included .Is (d) right ???
Pls give ur opinion.
Thanks.

[This message has been edited by Savio Mascarenhas (edited December 07, 2000).]
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exactly what is the part of the answer/question that you don't understand or agree with?? What exactly do you need?? Perhaps you can make your question a little more clearer.
Ajith
[This message has been edited by Ajith Kallambella (edited December 07, 2000).]
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
answer d being true is news to me. I guess the only way to know that is by looking at the source code for methods repaint() and update(). I dont think such a question is fair.
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I think a should not be the answer here. A GraphicContext is associated with every component and if you have a graphic context of a button, then you cant draw the entire screen with it, only the concerned component
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic