Hi, As we know AWT classes uses native OS libraries for creating GUIs but Swing uses Java library itself for creating the GUI.Can anyone please give me an example of the Windows OS library corresponds to a AWT GUI ?
Thx
Hi, As we know AWT classes uses native OS libraries for creating GUIs but Swing uses Java library itself for creating the GUI.Can anyone please give me an example of the Windows OS library corresponds to a AWT GUI ?
Thx
In theory it may depend on jvm implementation. But in windows it use WinAPI probably.
The short answer is the MFC (Microsoft Foundation Classes) which all of Windows widgets are based on.
If you recall the great MS and Java Lawsuit the reason MS "Split" with how Java was developing was the MFC--at that point, Sun was considering a "JFC" which more or less later became Swing. they didn't want to re-invent something they already have. regardless, Swing is based on AWT which is heavily based on Motif/X which if I remember right is also what MS based their MFC on... It not the jvm that determines how a particular Java Swing/AWT element--like a button, but the Native Peer for that platform, which is bound to Java via the JNI....