Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What are AWT peers?

AWT peers
0
Posted

What are AWT peers?

0

Ans : Peers are native-platform on-screen counterparts to AWT components. The AWT provides a cross-platform Application Programming Interface (API) for managing user-interface elements and behaviors. To provide a native look and feel, though, the AWT components rely on user-interface elements from the native-platform toolkits to draw themselves on screen and to provide an initial layer of event processing. These native counterparts are called peers. The java.awt.peer package defines interfaces through which Java components can control and otherwise communicate with their peers. The AWT peer interfaces are implemented by platform-specific peer classes that access the platform’s own toolkit using native methods (that is, methods implemented in a language other than Java). For example, an AWT button has three Javalanguage layers: • Button, a class in the java.awt package • ButtonPeer, an interface in the java.awt.peer package • a platform-specific button peer class containing native metho

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.