需要Java JFrame中的帮助 [英] Need Help in Java JFrame

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

问题描述

大家好,



虽然我对VB.Net有所了解,但我只有十(10)天的Java编程时间。



如果我能在以下方面获得帮助,我将非常高兴:



1.如何关闭JFrame表格(即.Net中的代码是me.close或结束)



2.如何在Java中使用MDI表格



3.可以使用哪个对象接受日期值,就像我们在.Net中使用datepicker一样,或者替代可以使用JTextField对象接受日期值的代码。



谢谢

Hi everyone,

I am just ten (10) days old in Java programming though I have knowledge of VB.Net.

Please I''ll be very glad if I can get assistance in the following area:

1. How to close a JFrame form (i.e. in .Net the code is me.close or end)

2. How to use MDI form in Java

3. Which object can be used to accept date value just like we have datepicker in .Net or in the alternative what code can one use with JTextField object to accept date values.

Thanks

推荐答案

如果你想关闭你的JFrame,你只需要打电话:

If you want to close your JFrame, you just need to call:
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //your main class must extend JFrame
//or use this otherwise
yourFrame.setDefaultCloseOperation(JFram.EXIT_ON_CLOSE);





这可以确保当您按下框架上的X按钮时,它会像任何其他框架一样关闭。 br />


至于在java中使用日期值,请查看此类:



This ensures that when you press "X" button on your frame, it will close like any other frame.

And as for using date values in java, look into this class:

java.util.Date





祝你好运。



Best regards.


1。搜索它 - 常见问题。

2.没有MDI。您可以使用Swing,SWT,JFace或其他GUI。这是Java的一大优势。我推荐Swing作为开头。

3.根据您正在使用的GUI,有小工具。
1. search for it - common problem.
2. There is no MDI. You can use Swing, SWT, JFace or another GUI. That''s one of the big advantages of Java. I recommend Swing for the beginning.
3. there are widgets for that depending on the GUI you''re using.


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

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