What are AWT peers? When are peers created and destroyed?

What are AWT peers? When are peers created and destroyed?

A Component is associated with a standard AWT button object, a peer object (hidden button object internal to the native GUI) and an interfacing button object constructed per the native GUI.

The behaviour of a particular component can depend on the peer. The peer object for a Button contains platform-dependent code whereas the AWT button object would be identical for all platforms.
Explain how to create a borderless window with an example
Explain how to create a borderless window public static void main(String[]args)....
Show with an example the usage of FileDialog object
Usage of FileDialog object - class FileDialog extends from Dialog class. It is used to display a dialog window from which the user can select a file...
Purpose of component’s requestFocus method
Purposes of component’s requestFocus method - The purpose of the requestFocus() is to get the focus on the particular component and also on the window...
Post your comment