Java Net Beans中的onload事件 [英] onload Event in Java Net Beans

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

问题描述



请任何人告诉我表单打开时我必须在java中使用什么事件来放置代码.就像在Visual Studio中,我们有表单加载事件.

在此先感谢您.

Hi ,

Please can anyone tell me what is the event that i must use in java to put code when the form opens.Like in visual studio where we have the form load event.

Thanks in advance.

推荐答案

您始终可以尝试使用<a href="http://download.oracle.com/javase/1.4.2/docs/api/java/awt/event/WindowListener.html">addWindowListener</a>,即假设您正在使用Swing的JFrame实现.

如果没有,那么您可能需要解释一下用来设置GUI的框架.
You could always try to use the <a href="http://download.oracle.com/javase/1.4.2/docs/api/java/awt/event/WindowListener.html">addWindowListener</a>, that is assuming that you are using Swing''s JFrame implementation.

If not then you might need to explain what framework you are using to setup your GUI.


这篇关于Java Net Beans中的onload事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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