<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_Tutorial%2FSWT%2FRowLayout</id>
		<title>Java Tutorial/SWT/RowLayout - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_Tutorial%2FSWT%2FRowLayout"/>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_Tutorial/SWT/RowLayout&amp;action=history"/>
		<updated>2026-04-21T14:15:30Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java_Tutorial/SWT/RowLayout&amp;diff=3199&amp;oldid=prev</id>
		<title> в 17:44, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_Tutorial/SWT/RowLayout&amp;diff=3199&amp;oldid=prev"/>
				<updated>2010-05-31T17:44:26Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 17:44, 31 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java_Tutorial/SWT/RowLayout&amp;diff=3200&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_Tutorial/SWT/RowLayout&amp;diff=3200&amp;oldid=prev"/>
				<updated>2010-05-31T15:22:00Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==  pack: Specifies whether all controls should take their preferred size ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If pack is set to true, all controls have the same size, which is the size required to accommodate the largest preferred height and the largest preferred width of all the controls. &lt;br /&gt;
The default value is true.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.List;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowlLayoutPack {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    final Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout rowLayout = new RowLayout();&lt;br /&gt;
    rowLayout.pack = false;&lt;br /&gt;
    &lt;br /&gt;
    shell.setLayout(rowLayout);&lt;br /&gt;
    Button button1 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button1.setText(&amp;quot;button1&amp;quot;);&lt;br /&gt;
    List list = new List(shell, SWT.BORDER);&lt;br /&gt;
    list.add(&amp;quot;item 1&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 2&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 3&amp;quot;);&lt;br /&gt;
    Button button2 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button2.setText(&amp;quot;button #2&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    shell.setSize(450, 100);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  RowLayout: align widgets in a row ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
/*******************************************************************************&lt;br /&gt;
 * Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br /&gt;
 * All rights reserved. This program and the accompanying materials&lt;br /&gt;
 * are made available under the terms of the Eclipse Public License v1.0&lt;br /&gt;
 * which accompanies this distribution, and is available at&lt;br /&gt;
 * http://www.eclipse.org/legal/epl-v10.html&lt;br /&gt;
 *&lt;br /&gt;
 * Contributors:&lt;br /&gt;
 *     IBM Corporation - initial API and implementation&lt;br /&gt;
 *******************************************************************************/&lt;br /&gt;
//package org.eclipse.swt.snippets;&lt;br /&gt;
/*&lt;br /&gt;
 * RowLayout snippet: align widgets in a row&lt;br /&gt;
 * &lt;br /&gt;
 * For a list of all SWT example snippets see&lt;br /&gt;
 * http://www.eclipse.org/swt/snippets/&lt;br /&gt;
 * &lt;br /&gt;
 * @since 3.1&lt;br /&gt;
 */&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowData;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowLayoutAlignWidgets {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout layout = new RowLayout(SWT.HORIZONTAL);&lt;br /&gt;
    layout.wrap = true;&lt;br /&gt;
    layout.fill = false;&lt;br /&gt;
    layout.justify = true;&lt;br /&gt;
    shell.setLayout(layout);&lt;br /&gt;
    Button b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Button 1&amp;quot;);&lt;br /&gt;
    b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Button 2&amp;quot;);&lt;br /&gt;
    b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Button 3&amp;quot;);&lt;br /&gt;
    b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Not shown&amp;quot;);&lt;br /&gt;
    b.setVisible(false);&lt;br /&gt;
    RowData data = new RowData();&lt;br /&gt;
    data.exclude = true;&lt;br /&gt;
    b.setLayoutData(data);&lt;br /&gt;
    b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Button 200 high&amp;quot;);&lt;br /&gt;
    data = new RowData();&lt;br /&gt;
    data.height = 200;&lt;br /&gt;
    b.setLayoutData(data);&lt;br /&gt;
    b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Button 200 wide&amp;quot;);&lt;br /&gt;
    data = new RowData();&lt;br /&gt;
    data.width = 200;&lt;br /&gt;
    b.setLayoutData(data);&lt;br /&gt;
    shell.pack();&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch())&lt;br /&gt;
        display.sleep();&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  RowLayout: fill ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Specifies whether all the controls in a row should share the same height if the type of this layout is HORIZONTAL.&lt;br /&gt;
Or, whether all the controls in a column should share the same width. &lt;br /&gt;
The default value is false.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.List;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowLayoutFill {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    final Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout rowLayout = new RowLayout();&lt;br /&gt;
    rowLayout.fill = true; // Overriding default values.&lt;br /&gt;
    &lt;br /&gt;
    shell.setLayout(rowLayout);&lt;br /&gt;
    Button button1 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button1.setText(&amp;quot;button1&amp;quot;);&lt;br /&gt;
    List list = new List(shell, SWT.BORDER);&lt;br /&gt;
    list.add(&amp;quot;item 1&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 2&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 3&amp;quot;);&lt;br /&gt;
    Button button2 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button2.setText(&amp;quot;button #2&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    shell.setSize(450, 100);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  RowLayout: justify ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Specifies whether the controls in a row should be justified. &lt;br /&gt;
The default value is false.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.List;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowLayoutJustify {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    final Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout rowLayout = new RowLayout();&lt;br /&gt;
    rowLayout.justify = true;&lt;br /&gt;
    &lt;br /&gt;
    shell.setLayout(rowLayout);&lt;br /&gt;
    Button button1 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button1.setText(&amp;quot;button1&amp;quot;);&lt;br /&gt;
    List list = new List(shell, SWT.BORDER);&lt;br /&gt;
    list.add(&amp;quot;item 1&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 2&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 3&amp;quot;);&lt;br /&gt;
    Button button2 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button2.setText(&amp;quot;button #2&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    shell.setSize(450, 100);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  RowLayout: marginLeft, marginRight, marginTop, marginBottom ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The default value for each of the margins is 3.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.List;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowLayoutMargin {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    final Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout rowLayout = new RowLayout();&lt;br /&gt;
    &lt;br /&gt;
    rowLayout.marginLeft=20;&lt;br /&gt;
    rowLayout.marginRight=20;&lt;br /&gt;
    rowLayout.marginTop=20;&lt;br /&gt;
    rowLayout.marginBottom=20;&lt;br /&gt;
    &lt;br /&gt;
    shell.setLayout(rowLayout);&lt;br /&gt;
    Button button1 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button1.setText(&amp;quot;button1&amp;quot;);&lt;br /&gt;
    List list = new List(shell, SWT.BORDER);&lt;br /&gt;
    list.add(&amp;quot;item 1&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 2&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 3&amp;quot;);&lt;br /&gt;
    Button button2 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button2.setText(&amp;quot;button #2&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    shell.setSize(450, 100);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  RowLayout snippet: align widgets in a column ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
/*******************************************************************************&lt;br /&gt;
 * Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br /&gt;
 * All rights reserved. This program and the accompanying materials&lt;br /&gt;
 * are made available under the terms of the Eclipse Public License v1.0&lt;br /&gt;
 * which accompanies this distribution, and is available at&lt;br /&gt;
 * http://www.eclipse.org/legal/epl-v10.html&lt;br /&gt;
 *&lt;br /&gt;
 * Contributors:&lt;br /&gt;
 *     IBM Corporation - initial API and implementation&lt;br /&gt;
 *******************************************************************************/&lt;br /&gt;
//package org.eclipse.swt.snippets;&lt;br /&gt;
/*&lt;br /&gt;
 * RowLayout snippet: align widgets in a column&lt;br /&gt;
 * &lt;br /&gt;
 * For a list of all SWT example snippets see&lt;br /&gt;
 * http://www.eclipse.org/swt/snippets/&lt;br /&gt;
 * &lt;br /&gt;
 * @since 3.1&lt;br /&gt;
 */&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowData;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowLayoutAlignColumn {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout layout = new RowLayout(SWT.HORIZONTAL);&lt;br /&gt;
    layout.wrap = true;&lt;br /&gt;
    layout.fill = true;&lt;br /&gt;
    layout.justify = false;&lt;br /&gt;
    shell.setLayout(layout);&lt;br /&gt;
    Button b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Button 1&amp;quot;);&lt;br /&gt;
    b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Button 2&amp;quot;);&lt;br /&gt;
    b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Button 3&amp;quot;);&lt;br /&gt;
    b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Not shown&amp;quot;);&lt;br /&gt;
    b.setVisible(false);&lt;br /&gt;
    RowData data = new RowData();&lt;br /&gt;
    data.exclude = true;&lt;br /&gt;
    b.setLayoutData(data);&lt;br /&gt;
    b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Button 200 high&amp;quot;);&lt;br /&gt;
    data = new RowData();&lt;br /&gt;
    data.height = 200;&lt;br /&gt;
    b.setLayoutData(data);&lt;br /&gt;
    b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;Button 200 wide&amp;quot;);&lt;br /&gt;
    data = new RowData();&lt;br /&gt;
    data.width = 200;&lt;br /&gt;
    b.setLayoutData(data);&lt;br /&gt;
    shell.pack();&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch())&lt;br /&gt;
        display.sleep();&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  RowLayout: spacing ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Specifies the space between controls in pixels&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.List;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowLayoutSpacing {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    final Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout rowLayout = new RowLayout();&lt;br /&gt;
    rowLayout.spacing = 40;&lt;br /&gt;
    &lt;br /&gt;
    shell.setLayout(rowLayout);&lt;br /&gt;
    Button button1 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button1.setText(&amp;quot;button1&amp;quot;);&lt;br /&gt;
    List list = new List(shell, SWT.BORDER);&lt;br /&gt;
    list.add(&amp;quot;item 1&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 2&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 3&amp;quot;);&lt;br /&gt;
    Button button2 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button2.setText(&amp;quot;button #2&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    shell.setSize(450, 100);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  RowLayout: type ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;Specifies whether the layout places controls in rows or columns.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;The default value is HORIZONTAL.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;The other possible value is VERTICAL.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.List;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowLayoutType {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    final Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout rowLayout = new RowLayout();&lt;br /&gt;
    rowLayout.type = SWT.VERTICAL;&lt;br /&gt;
    &lt;br /&gt;
    shell.setLayout(rowLayout);&lt;br /&gt;
    Button button1 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button1.setText(&amp;quot;button1&amp;quot;);&lt;br /&gt;
    List list = new List(shell, SWT.BORDER);&lt;br /&gt;
    list.add(&amp;quot;item 1&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 2&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 3&amp;quot;);&lt;br /&gt;
    Button button2 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button2.setText(&amp;quot;button #2&amp;quot;);&lt;br /&gt;
    shell.setSize(450, 200);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  RowLayout: wrap ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Specifies whether controls will be wrapped to the next row or column if there is not enough space left on the current row or column. &lt;br /&gt;
The default value is true.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.List;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowLayoutWrap {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    final Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout rowLayout = new RowLayout();&lt;br /&gt;
    rowLayout.wrap = false;&lt;br /&gt;
    &lt;br /&gt;
    shell.setLayout(rowLayout);&lt;br /&gt;
    Button button1 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button1.setText(&amp;quot;button1&amp;quot;);&lt;br /&gt;
    List list = new List(shell, SWT.BORDER);&lt;br /&gt;
    list.add(&amp;quot;item 1&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 2&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 3&amp;quot;);&lt;br /&gt;
    Button button2 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button2.setText(&amp;quot;button #2&amp;quot;);&lt;br /&gt;
    shell.setSize(450, 200);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Using all default value from RowLayout ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.List;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowLayoutDefaultValue {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    final Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout rowLayout = new RowLayout();&lt;br /&gt;
    shell.setLayout(rowLayout);&lt;br /&gt;
    Button button1 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button1.setText(&amp;quot;button1&amp;quot;);&lt;br /&gt;
    List list = new List(shell, SWT.BORDER);&lt;br /&gt;
    list.add(&amp;quot;item 1&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 2&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 3&amp;quot;);&lt;br /&gt;
    Button button2 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button2.setText(&amp;quot;button #2&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    shell.setSize(450, 100);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Using RowData Objects ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;The corresponding layout data for the RowLayout class is the RowData class.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;RowData can specify the initial width and height of a control.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;Layout data objects should not be reused in SWT/JFace&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowData;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.List;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowLayoutRowData {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    final Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout rowLayout = new RowLayout();&lt;br /&gt;
    shell.setLayout(rowLayout);&lt;br /&gt;
    Button button1 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button1.setText(&amp;quot;button1&amp;quot;);&lt;br /&gt;
    List list = new List(shell, SWT.BORDER);&lt;br /&gt;
    list.add(&amp;quot;item 1&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 2&amp;quot;);&lt;br /&gt;
    list.add(&amp;quot;item 3&amp;quot;);&lt;br /&gt;
    list.setLayoutData(new RowData(100, 35));&lt;br /&gt;
    &lt;br /&gt;
    Button button2 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button2.setText(&amp;quot;button #2&amp;quot;);&lt;br /&gt;
    shell.setSize(450, 200);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Using RowLayout ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;places all controls in a single column or row.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;it doesn&amp;quot;t force all contained controls to the same size.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;wrap controls to a new row or column if it runs out of space.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;uses the RowData class to determine initial widths and heights for its controls.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.RowData;&lt;br /&gt;
import org.eclipse.swt.layout.RowLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class RowLayoutTest {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    Shell shell = new Shell(display);&lt;br /&gt;
    RowLayout layout = new RowLayout(SWT.VERTICAL);&lt;br /&gt;
    layout.marginLeft = 20;&lt;br /&gt;
    layout.marginTop = 20;&lt;br /&gt;
    layout.justify = true;&lt;br /&gt;
    shell.setLayout(layout);&lt;br /&gt;
    &lt;br /&gt;
    new Button(shell, SWT.PUSH).setText(&amp;quot;one&amp;quot;);&lt;br /&gt;
    new Button(shell, SWT.PUSH).setText(&amp;quot;two&amp;quot;);&lt;br /&gt;
    new Button(shell, SWT.PUSH).setText(&amp;quot;three&amp;quot;);&lt;br /&gt;
    new Button(shell, SWT.PUSH).setText(&amp;quot;four&amp;quot;);&lt;br /&gt;
    new Button(shell, SWT.PUSH).setText(&amp;quot;five&amp;quot;);&lt;br /&gt;
    new Button(shell, SWT.PUSH).setText(&amp;quot;six&amp;quot;);&lt;br /&gt;
    Button b = new Button(shell, SWT.PUSH);&lt;br /&gt;
    b.setText(&amp;quot;seven&amp;quot;);&lt;br /&gt;
    b.setLayoutData(new RowData(100, 100));&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>