📄 extraguidemo5.java
字号:
/**
*A file dialog demonstration program
*FileDialog provides a basic file open/save dialog box that enables accessibility
* to the file system.The FileDialog is system-independent,but depending on the
* platform,the standard open/save dialog is brought up
*Steps to create a FileDialog:
*1.using the following constructor:
FileDialog(Frame,String,int)
The int argument specifies the mode,i.e.either FileDialog.LOAD for file open
or FileDialog.SAVE for file save.
*2.Create an instance of FileDialog class
*3.use the show() method to display it.
*2005.1.11. xhcprince
*/
import java.awt.*;
public class extraGUIDemo5
{
public static void main(String args[])
{
Myframe f = new Myframe("My window");
f.setVisible(true);
f.setSize(400,300);
FileDialog fd = new FileDialog(f,"open",FileDialog.LOAD);
fd.show();
// fd.setVisible(true);it's right too!
}
}
class Myframe extends Frame
{
Myframe(String name)
{
super(name);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -