gridbagpanel.xml

来自「一个很好的XUL技术的java Swing用户界面开源程序」· XML 代码 · 共 121 行

XML
121
字号
<?xml version="1.0" encoding="UTF-8" ?>
<!--
   SwingML
   Copyright (C) 2002 Robert Morris.
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.
 
   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.
  
   You should have received a copy of the GNU Library General Public
   License along with this library; if not, write to the
   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.
 
   Authors:
       Robert Morris <robertj@morris.net>
-->

<!DOCTYPE FRAME SYSTEM "SwingML.dtd">
<FRAME NAME="GridDialog" TEXT="GridBagLayout Demo" WIDTH="400" HEIGHT="400" LAYOUT="BorderLayout">
  <PANEL LAF="Windows" LAYOUT="BorderLayout" NAME="mainPanel" ORIENTATION="Center">
	<GRIDBAG-PANEL PADDING="2" FILL="Both" NAME="outerPanel" ORIENTATION="Center" ANCHOR="NorthWest" WEIGHTX="100%">
		<GRIDBAG-ROW WEIGHTY="10%" FILL="Both">
			<GRIDBAG-CELL>
				<GRIDBAG-PANEL PADDING="0" NAME="firstPanel" ANCHOR="NorthWest" WEIGHTY="100%">
					<GRIDBAG-ROW PADDING="2">

						<GRIDBAG-CELL>
							<LABEL NAME="firstNameLabel" TEXT="First Name"/>
						</GRIDBAG-CELL>
						<GRIDBAG-CELL FILL="Horizontal" WEIGHTX="100%">
							<TEXTFIELD NAME="firstNameField" TEXT="" COLS="15"/>
						</GRIDBAG-CELL>
					</GRIDBAG-ROW>
					<GRIDBAG-ROW PADDING="2">
						<GRIDBAG-CELL>

							<LABEL NAME="lastNameLabel" TEXT="Last Name"/>
						</GRIDBAG-CELL>
						<GRIDBAG-CELL FILL="Horizontal">
							<TEXTFIELD NAME="lastNameField" TEXT="" COLS="15"/>
						</GRIDBAG-CELL>
					</GRIDBAG-ROW>
					<GRIDBAG-ROW PADDING="2">
						<GRIDBAG-CELL>
							<LABEL NAME="address1Label" TEXT="Address 1"/>

						</GRIDBAG-CELL>
						<GRIDBAG-CELL FILL="Both">
							<TEXTFIELD NAME="address1Field" TEXT="" COLS="15"/>
						</GRIDBAG-CELL>
					</GRIDBAG-ROW>
					<GRIDBAG-ROW PADDING="2">
						<GRIDBAG-CELL>
							<LABEL NAME="address2Label" TEXT="Address 2"/>
						</GRIDBAG-CELL>

						<GRIDBAG-CELL FILL="Both">
							<TEXTFIELD NAME="address2Field" TEXT="" COLS="15"/>
						</GRIDBAG-CELL>
					</GRIDBAG-ROW>
					<GRIDBAG-ROW PADDING="2">
						<GRIDBAG-CELL>
							<LABEL NAME="address3Label" TEXT="Address 3"/>
						</GRIDBAG-CELL>
						<GRIDBAG-CELL FILL="Both">

							<TEXTFIELD NAME="address3Field" TEXT="" COLS="15"/>
						</GRIDBAG-CELL>
					</GRIDBAG-ROW>
					<GRIDBAG-ROW FILL="Both" GRIDWIDTH="1" PADDING="2">
						<GRIDBAG-CELL>
							<LABEL NAME="comboLabel" TEXT="Some Combo Data"/>
						</GRIDBAG-CELL>
						<GRIDBAG-CELL>
							<COMBOBOX NAME="aComboBox">

								<ITEM TEXT="1"/>
								<ITEM TEXT="2"/>
								<ITEM TEXT="3"/>
								<ITEM TEXT="4"/>
							</COMBOBOX>
						</GRIDBAG-CELL>
					</GRIDBAG-ROW>
				</GRIDBAG-PANEL>
			</GRIDBAG-CELL>

		</GRIDBAG-ROW>
		<GRIDBAG-ROW PADDING="0">
			<GRIDBAG-CELL WEIGHTY="0%" FILL="None" ANCHOR="East">
				<BUTTON NAME="aButton" TEXT="Hello"/>
			</GRIDBAG-CELL>
		</GRIDBAG-ROW>
		<GRIDBAG-ROW WEIGHTY="90%" FILL="Both" PADDING="2">
			<GRIDBAG-CELL>
				<LIST NAME="thisIsaList">

					<ITEM TEXT="item1"/>
					<ITEM TEXT="item1"/>
					<ITEM TEXT="item1"/>
					<ITEM TEXT="item1"/>
					<ITEM TEXT="item1"/>
					<ITEM TEXT="item1"/>
					<ITEM TEXT="item1"/>
					<ITEM TEXT="item1"/>
					<ITEM TEXT="item1"/>
					<ITEM TEXT="item1"/>
					<ITEM TEXT="item1"/>
					<ITEM TEXT="item1"/>
				</LIST>
			</GRIDBAG-CELL>
		</GRIDBAG-ROW>
	</GRIDBAG-PANEL>
  </PANEL>
</FRAME>

⌨️ 快捷键说明

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