Abstract Window Toolkit: Difference between revisions

Content deleted Content added
m External links: use wikidata for Commons link
Cewbot (talk | contribs)
m Fix broken anchor: #Java SE 6 .28December 11.2C 2006.29→most alike anchor Java version history#Java SE 6, #Java SE 6 Update 10→most alike anchor Java version history#Java SE 6
Line 33:
When drawing in Swing, use JPanel and override paintComponent(Graphics g) instead of using the AWT paint() methods.
 
Prior to [[Java version history#Java SE 6 .28December 11.2C 2006.29|Java 6 Update 12]], mixing [[Swing (Java)|Swing]] components and basic AWT widgets often resulted in undesired side effects, with AWT widgets appearing on top of the Swing widgets regardless of their defined [[z-order]]. This problem was because the rendering architecture of the two widget toolkits was very different, despite Swing borrowing heavyweight top [[Container (data structure)#Graphic containers|containers]] from AWT.<ref>{{cite web
|url=http://java.sun.com/products/jfc/tsc/articles/mixing/index.html
|title=Mixing heavy and light components
Line 46:
}}</ref>
 
Starting in [[Java version history#Java SE 6 Update 10|Java 6 Update 12]], it is possible to mix Swing and AWT widgets without having z-order problems.<ref>{{cite web
|url=http://download.java.net/jdk6/6u12/promoted/b02/changes/jdk6uN-b02.html
|title=Bug/RFE fixed in current JDK 6u12 build