COD3BOY
COD3BOY

Reputation: 12092

AWT and Swing components in NetBeans

Scenario : In NetBeans, you create Swing components via drag & drop and customize some properties via the given GUI.

Question : Later on, If you see the generated code of these components, either in source or by by right-clicking the component and selecting customize code, we can see that the property changes are implemented via AWT. Why is this so?

Upvotes: 0

Views: 2181

Answers (1)

trashgod
trashgod

Reputation: 205785

As mentioned in Using Top-Level Containers,

Each program that uses Swing components has at least one top-level container. This top-level container is the root of a containment hierarchy — the hierarchy that contains all of the Swing components that appear inside the top-level container.

java.awt.Container, an AWT Componenet, is that container.

Addendum: This overview suggests how pervasively the interface java.beans.PropertyChangeListener is used throughout AWT and Swing.

Upvotes: 2

Related Questions