做肠镜要挂什么科| 桑葚泡水喝有什么功效| 小鸡炖什么好吃| as是什么元素| 河粉是什么材料做的| 疖肿吃什么药| 做面包用什么面粉| 什么泡水喝治口臭| 香菜吃多了有什么坏处| 韭菜苔炒什么好吃| 硼砂是什么东西| 月经前腰疼的厉害是什么原因| 甯字五行属什么| 热感冒吃什么食物好| 鹌鹑吃什么食物| 吃了鸡蛋不能吃什么| 知了为什么一直叫| 白痰多是什么原因造成的| 送礼送什么水果| 强迫症吃什么药效果好| 眼睛流水是什么原因| 盐水洗脸有什么好处与坏处| 地屈孕酮片什么时候吃| 五官指什么| 婴儿补铁吃什么铁剂| 输卵管堵塞有什么症状| 头痛头晕吃什么药| 感冒没胃口吃什么好| 耳朵响是什么原因引起的| 来世是什么意思| 中统和军统有什么区别| bm是什么牌子| 左腿发麻是什么病征兆| 阿莫西林治什么| 十二月十八号是什么星座| 18岁属什么的生肖| 金刚藤有什么功效| 4月16日什么星座| 什么叫suv车| 黑龙江有什么特产| 手抽筋是什么原因引起的| conch是什么牌子| 脓毒血症是什么病| rem睡眠是什么意思| 小孩疳积有什么症状| 两肺少许纤维灶是什么意思| 冠心吃什么药好| 电影bd是什么意思| 主动脉夹层a型是什么病| 血常规用什么颜色的试管| 松子是什么树的果实| 鹅蛋有什么功效| 梦见建房子是什么预兆| 怎么算自己五行缺什么| 雪莲果什么季节成熟| 万言万当不如一默是什么意思| 什么避孕套好用| novo是什么牌子| 局灶癌变是什么意思| 低血糖吃什么糖| 养生吃什么最好| 减肥吃什么玉米| 祸起萧墙是什么意思| 舌苔黄腻厚是什么原因| 黑科技是什么意思| 月经来了一点就没了是什么原因| 痤疮用什么药膏| 孩子吃什么能长高| 胆结石不能吃什么东西| polo villae是什么档次| 手脚浮肿是什么原因| 五月十九日是什么星座| 特应性皮炎是什么意思| otc是什么意思| 秦二世叫什么名字| 水浒传有什么故事| 吃什么补阴虚最好| 来月经前头痛什么原因| 黄酒是什么| 标准工资指什么| 一抹多是什么意思| 学海无涯苦作舟的上一句是什么| 病人化疗期间吃什么好| 甲鱼蛋什么人不能吃| 脾胃虚寒吃什么药| 为什么睡觉后鱼刺没了| 蓝瘦香菇是什么意思| 吉和页念什么| 什么动物吃蜘蛛| dido是什么牌子| 孕妇梦见自己出轨是什么意思| 变异性哮喘什么症状| 岳绮罗是什么来历| 多吃海带有什么好处和坏处| 胃糜烂吃什么药可以根治| 结婚前要准备什么| 皮肤过敏有什么妙招| 银子发黑是什么原因| copd什么意思| 中国第一艘航空母舰叫什么| 什么叫五音不全| 瑄五行属什么| 74年属什么| 长河落日圆什么意思| 梦见蛇追我是什么预兆| 不堪一击是什么意思| 1893年是什么年| 血糖能吃什么水果| 元五行属性是什么| 勤劳的小蜜蜂什么意思| 荠菜长什么样子图片| 绞丝旁奇念什么| 风致是什么意思| 权衡利弊的意思是什么| 血压低会出现什么症状| 什么是三重一大事项| 团委书记是什么级别| 什么原因导致尿酸高| 什么是真爱| 头发爱出油什么原因| 六七是什么意思| 一一是什么意思| 12月12号什么星座| 考试为什么要用2b铅笔| 老人脚浮肿是什么原因引起的| 七月十六是什么星座| 考试什么的都去死吧歌曲| 心里烦躁是什么原因| 火腿肠是什么做的| 尿路感染吃什么药比较好的快| 子癫是什么病| 荔枝有什么作用与功效| 做胃镜之前需要做什么准备| 49岁属什么| 喆读什么| 小康生活的标准是什么| 当归有什么作用| 柠檬吃多了有什么坏处| 吞咽困难是什么原因造成的| 上不来气是什么原因| 山东特产是什么| 三点水山今读什么| 为什么乳头会变硬| 一丘之貉是什么意思| 痛风有什么症状| 枸杞对女人有什么好处| 人的反义词是什么| 析是什么意思| 装修公司名字取什么好| 无稽之谈是什么意思| 心火旺吃什么中药| 雾灯什么时候开| beginning什么意思| 补钾用什么药| 卧推60公斤什么水平| 坏血病的症状是什么| 郭麒麟什么学历| 阴道炎应该吃什么药| 平均红细胞体积偏低是什么意思| 大小便失禁是什么意思| 杨八妹属什么生肖| 胰岛是什么器官| 右耳朵疼是什么原因| 吃什么去肝火效果最好| 别出心裁是什么生肖| f00d中文是什么意思| 偶见是什么意思| 木耳吃多了有什么坏处| 警察是什么生肖| 梗阻是什么意思| 冬天种什么蔬菜合适| 病毒性感冒吃什么药效果好| 慢性宫颈炎是什么意思| 风寒吃什么感冒药| 白菜是什么颜色| c2m模式是什么意思| 蛇蝎美人是什么意思| 月字旁的字和什么有关| 为什么会得带状疱疹| 男人分手是什么感觉| kappa是什么意思| 耳根子软是什么意思| 生孩子大出血是什么原因造成的| 5月12号是什么日子| 炎字五行属什么| 耳鸣耳聋吃什么药| 吃榴莲对身体有什么好处| 咽喉疼痛吃什么药好| 气结是什么意思| 单亲家庭是什么意思| 云是什么生肖| 电动汽车什么牌子好| siri是什么| 尿道感染用什么药| 玫瑰花和什么一起泡水喝好| 大大是什么意思| 子宫直肠窝积液是什么意思| 祈字五行属什么| 1985年属什么生肖| 闭关修炼是什么意思| 湿气重吃什么调理| 海鲜有什么| 亵玩是什么意思| 十月初八是什么星座| 猫咪呕吐吃什么药可以解决| 3月2日是什么星座| 两千年前是什么朝代| 儿童拉肚子挂什么科| 舌根苔白厚腻是什么原因| 什么情况要打破伤风| 什么面料不容易皱| 驾驶证c1和c2有什么区别| 突然晕倒是什么原因造成的| 法盲是什么意思| bn是什么意思| 嘴唇溃疡是什么原因| 局是什么生肖| 甜菜根是什么| 空调滤芯什么牌子好| 喉咙不舒服吃什么水果好| 硅胶是什么材质| 孩子上火了吃什么降火最快| top是什么| 一什么野菜| 被螨虫咬了非常痒用什么药膏好| 兔对冲生肖是什么| 什么药吃了会产生幻觉| c60是什么| 右肺疼是什么原因| 产后复查挂什么科| 血糖低是什么原因引起的| 自然是什么意思| hello中文是什么意思| 什么样的孙悟空| 尾椎骨疼是什么原因| 吃多种维生素有什么好处和坏处| 反流性食管炎吃什么药好| 孩子改姓需要什么手续| 痰浊是什么意思| 吉可以加什么偏旁| 什么样的男人不能嫁| 离子检测是检查什么| 过敏应该挂什么科| k金是什么| gucci中文叫什么牌子| 吃茶油对身体有什么好处| 好好的什么意思| 什么地站着| 为什么眼皮一直跳| 吃过榴莲不能吃什么| hv是什么意思| 莲子吃了有什么好处| 脖子疼吃什么药| 老舍原名叫什么| 基础油是什么油| 宫腔镜是什么意思| 夏天可以做什么| cdfl是什么意思| 1938年属什么| 一直不射精是什么原因| 入职体检挂什么科| 肠管积气是什么原因| 什么的狼| 小龙虾吃什么| 百度Jump to content

北京市节水每年攒下50个昆明湖

From Wikipedia, the free encyclopedia
百度 加上老年人体力比较差,蹲的时间一长,猛地站起来,容易头晕眼花、发生意外,所以对于老人来说还是马桶更安全一些。

Windows form with some AWT examples

The Abstract Window Toolkit (AWT) is Java's original platform-dependent windowing, graphics, and user-interface widget toolkit, preceding Swing. The AWT is part of the Java Foundation Classes (JFC) — the standard API for providing a graphical user interface (GUI) for a Java program. AWT is also the GUI toolkit for a number of Java ME profiles. For example, Connected Device Configuration profiles require Java runtimes on mobile telephones to support the Abstract Window Toolkit.

History

[edit]

When Sun Microsystems first released Java in 1995, AWT widgets provided a thin level of abstraction over the underlying native user-interface. For example, creating an AWT check box would cause AWT directly to call the underlying native subroutine that created a check box. However, the check box on Windows is not the same as the check box on macOS or on the various types of Unix. Some application developers prefer this model because it provides a high degree of fidelity to the underlying native windowing toolkit and seamless integration with native applications. In other words, a GUI program written using AWT looks like a native Microsoft Windows application when run on Windows, but the same program looks like a native Apple Macintosh application when run on a Mac, etc. However, some application developers dislike this model because they prefer their applications to look exactly the same on every platform.

In J2SE 1.2, the Swing toolkit largely superseded the AWT's widgets. In addition to providing a richer set of UI widgets, Swing draws its own widgets (by using Java 2D to call into low-level subroutines in the local graphics subsystem) instead of relying on the operating system's high-level user interface module. Swing provides the option of using either the native platform's "look and feel" or a cross-platform look and feel (the "Java Look and Feel") that looks the same on all windowing systems.

Architecture

[edit]

The AWT provides two levels of APIs:

AWT also makes some higher level functionality available to applications, such as:

Neither AWT nor Swing is inherently thread safe. Therefore, code that updates the GUI or processes events should execute on the Event dispatching thread. Failure to do so may result in a deadlock or race condition. To address this problem, a utility class called SwingWorker allows applications to perform time-consuming tasks following user-interaction events in the event dispatching thread.

Mixing AWT and Swing components

[edit]

Where there is a Swing version of an AWT component it will begin with J- and should be used exclusively, replacing the AWT version. For example, in Swing, only use JButton, never Button class. As mentioned above, the AWT core classes, such as Color and Font, are still used as-is in Swing.

When drawing in Swing, use JPanel and override paintComponent(Graphics g) instead of using the AWT paint() methods.

Before Java 6 Update 12, mixing 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 containers from AWT.[1]

Starting in Java 6 Update 12, it is possible to mix Swing and AWT widgets without having z-order problems.[2]

Example

[edit]
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class MyApp {

    public static void main(String[] args) {
        Frame frame = new Frame("Application");
        
        frame.add(new Label("Hello!"));
        frame.setSize(500, 500);
        frame.setLocationRelativeTo(null); // Centers the window
        
        frame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                frame.dispose(); // Releases native screen resources
            }
        });
        
        frame.setVisible(true);
    }
}

Implementation

[edit]

As the AWT is a bridge to the underlying native user-interface, its implementation on a new operating system may involve a lot of work, especially if it involves any of the AWT GUI widgets, because each of them requires that its native peers be developed from scratch.

A new project, Caciocavallo, has been created, that provides an OpenJDK-based Java API to ease AWT implementation on new systems.[3][4] The project has successfully implemented AWT widgets using Java2D.[5] All the necessary core-JDK modifications have since been pushed to OpenJDK 7,[6] which means that Java can now be used on a graphics stack other than one of those provided by the official JDK (X Window System, OpenGL or DirectX), by including an external library and setting some system properties. A DirectFB backend for Caciocavallo[7] is under development, as is an HTML5 backend; the aim is to deploy existing Swing applications—without Java support—as ordinary web applications running on a web server.[7][8]

See also

[edit]

References

[edit]
  1. ^ Fowler, Amy (1994). "Mixing heavy and light components". Sun Microsystems. Archived from the original on 23 December 2011. Retrieved 17 December 2008.
  2. ^ "Bug/RFE fixed in current JDK 6u12 build". Sun Microsystems. 12 December 2008. Archived from the original on 17 December 2008. Retrieved 17 December 2008.
  3. ^ Torre, Mario (2 March 2008). "FINAL PROPOSAL: Portable GUI backends". Archived from the original on 19 March 2012. Retrieved 7 September 2008.
  4. ^ Kennke, Roman (18 December 2008). "Caciocavallo Architecture Overview". Retrieved 7 September 2008.
  5. ^ Kennke, Roman (3 September 2008). "Cacio Swing AWT peers". Archived from the original on 13 March 2012. Retrieved 7 September 2008.
  6. ^ "How much has been pushed upstream?". openjdk.java.net. 20 September 2009. Archived from the original on 19 March 2012. Retrieved 7 March 2010. You don't need anymore of those patches, with the latest FontManager push, everything is upstream now, so just use the Cacio repo, it's completely self contained.
  7. ^ a b Kennke, Roman (28 July 2011). "JDK7 and Cacio coolness". Retrieved 8 August 2011.
  8. ^ Eisserer, Clemens. "HTML5/Canvas backend for Caciocavallo (GNU-Classpath)". Archived from the original on 21 March 2012. Retrieved 8 August 2011.
[edit]
指甲盖有竖纹是什么原因 宝宝是什么意思 脉细滑是什么意思 麦克白夫人什么意思 皮囊炎用什么药膏
幼犬拉稀吃什么药最好 什么可以变白皮肤 刚怀孕吃什么对胎儿好 大头虾是什么意思 什么是刷酸
尿是红色的是什么原因 剖腹产后能吃什么水果 的意思是什么 割伤用什么药愈合伤口 吃柠檬是什么意思
mv是什么单位 农历六月初十是什么日子 榴莲不能与什么食物一起吃 为什么发动文化大革命 吃了发芽的土豆会有什么症状
伯伯的儿子叫什么hcv8jop6ns1r.cn rd是什么dayuxmw.com 前方起飞是什么意思hcv8jop9ns1r.cn 腋下出汗是什么原因hcv8jop1ns2r.cn 肝钙化灶是什么意思hcv8jop4ns7r.cn
妇检tct是什么检查hcv7jop9ns0r.cn 探索是什么意思ff14chat.com 云南白药有什么功效jingluanji.com 如何知道自己是什么星座hcv9jop1ns9r.cn 心管是什么部位hcv8jop1ns1r.cn
淞字五行属什么hcv8jop2ns0r.cn 口干舌燥是什么原因hcv9jop7ns9r.cn 尿道发炎吃什么药hcv8jop5ns8r.cn 念珠菌感染用什么药xinmaowt.com 低gi是什么意思hcv9jop0ns9r.cn
牙齿矫正挂什么科hcv8jop7ns7r.cn 逍遥丸的功效和作用是什么hcv8jop3ns7r.cn 6月20号什么星座hcv9jop5ns1r.cn 非特异性t波异常是什么意思hcv8jop4ns0r.cn 狒狒是什么动物hcv8jop2ns6r.cn
百度