27 Mart 2019 Çarşamba

Awt Canvas Sınıfı

Giriş
Hiyerarşisi şöyle.
public class Canvas extends Component implements Accessible
Açıklaması şöyle.
A canvas is for drawing on, basically. It also serves like a Panel for creating a custom AWT-based component, but unlike Panel it can't contain other components.
Canvas C++ kütüphanesi tarafından kullanılabilir çünü Awt bileşeni olduğu için işletim sisteminde handle olarak karşılığı bulunur. Açıklaması şöyle.  Yani heavyweight bir bileşendir.
There are two kinds of graphics components in the Java programming language: heavyweight and lightweight. A heavyweight component is associated with its own native screen resource (commonly known as a peer). Components from the java.awt package, such as Button and Label, are heavyweight components.
[...]
A lightweight component has no native screen resource of its own, so it is "lighter." A lightweight component relies on the screen resource from an ancestor in the containment hierarchy, possibly the underlying Frame object. Components from the javax.swing package, such as JButton and JLabel, are lightweight components.

Hiç yorum yok:

Yorum Gönder