⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 12_2.htm

📁 翁剀JAVA语言那门课程的教案 很多人都看多他的视频教程可惜没有ppt的教案
💻 HTM
字号:
<!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>BorderLayout</title>
</head>
<body>

<h2>
12.2 BorderLayout</h2>

<hr WIDTH="100%">
<br>This layout manager has the concept of four border regions and a center
area. When you add something to a panel that's using a BorderLayout you
must use an add( ) method that takes a String object as its first argument,
and that string must specify (with proper capitalization) "North" (top),
"South" (bottom), "East" (right), "West" (left), or "Center".&nbsp; If
you misspell or mis-capitalize, you won't get a compile-time error, but
the applet simply won't do what you expect. Fortunately, as you will see
shortly, there's a much-improved approach in Java 1.1.
<p>Case Study: <a href="case/Layout/BorderLayout1.java">BorderLayout1.java</a>
<p><applet code=BorderLayout1 width=200 height=200 codebase=case/Layout></applet>
<br>For every placement but "Center", the element that you add is compressed
to fit in the smallest amount of space along one dimension while it is
stretched to the maximum along the other dimension. "Center", however,
spreads out along both dimensions to occupy the middle.
<p>The BorderLayout is the default layout manager for applications and
dialogs.
<br>
<hr WIDTH="100%">
<div align=right><a href="12_3.htm">Next Page</a></div>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -