Computer Science, asked by kamleshshinde356, 4 months ago

The setBackground() method is part of which of
the following class java.awt package?
(a) Component (b) Applet
(c) Object
(d) Graphics​

Answers

Answered by gadgenanu
0

Explanation:

If you want to change it then you can call the setBackground(java. awt. Color) method and choose the color you want. Defining the background color in the init() method will change the color as soon as the applet initialized.

Answered by anjalin
0

(A) The setBackground() method is enclosed in component class of java AWT package.

Explanation:

  • The component class could be a abstract super class of the non-menu-related to the elements of Abstract Toolkit Window.
  • A lightweight component isn't associated with any native window.
  • It contains all the classes in creating the user interfaces and to color illustrations and photos.
  • A component class could be a class that is expounded to a page, component in an exceedingly web application.
  • Classes for pages, components are whole created within the indistinguishable approach.

Hence, setBackground() method is enclosed in component class of the java AWT package.

Similar questions