12_7_3.htm
来自「翁剀JAVA语言那门课程的教案 很多人都看多他的视频教程可惜没有ppt的教案」· HTM 代码 · 共 30 行
HTM
30 行
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Weng Kai">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (Win95; I) [Netscape]">
<title>File dialogs</title>
</head>
<body>
<h3>
12.7.3 File dialogs</h3>
<hr WIDTH="100%">
<br>Some operating systems have a number of special built-in dialog boxes
to handle the selection of things such as fonts, colors, printers, and
the like. Virtually all graphical operating systems support the opening
and saving of files, however, and so Java's FileDialog encapsulates these
for easy use. This, of course, makes no sense at all to use from an applet
since an applet can neither read nor write files on the local disk. (This
will change for trusted applets in newer browsers.)
<p>The following application exercises the two forms of file dialogs, one
for opening and one for saving. Most of the code should by now be familiar,
and all the interesting activities happen in action( ) for the two different
button clicks:
<p>Case Study: <a href="case/Windows/FileDialogTest.java">FileDialogTest.java</a>
<p>For an "open file" dialog, you use the constructor that takes two arguments;
the first is the parent window handle and the second is the title for the
title bar of the FileDialog. The method setFile( ) provides an initial
file name
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?