Java GUI中没有听众AWT [英] Java GUI listeners without AWT

查看:143
本文介绍了Java GUI中没有听众AWT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个开始Java开发人员,从互联网上教程只是学习。我学习全屏GUI应用程序。我昨天告诉我不应该在我的程序中使用AWT,因为它已经过时了。我已经知道光重量级组件,主要的问题是鼠标和键盘监听器。
为什么AWT已经过时?
如何使一个程序而不AWT(增加听众JComponent上等)(什么样的东西摆动可以代替AWT)?

I am a starting Java developer, learning just from internet tutorials. I am learning full screen GUI applications. I was told yesterday that I shouldn't use AWT in my programs, because it is outdated. I already know about light and heavyweight components, the main problem is the mouse and keyboard listeners. Why is AWT outdated? How to make a program without AWT (adding listeners to JComponents etc) (what kind of Swing things can replace the AWT)?

推荐答案

您是误间preting给你的信息。您应该避免使用Swing组件使用AWT的组件。这是确定要使用Swing与AWT监听器的结构,布局管理器等,而事实上这是不可能没有。

You're mis-interpreting the information given to you. You should avoid using Swing components with AWT components. It's OK to use Swing with the AWT listener structure, layout managers, etc. and in fact it's impossible not to.

这篇关于Java GUI中没有听众AWT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆