<?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_by_API%2Forg.eclipse.swt.widgets%2FTable</id>
		<title>Java by API/org.eclipse.swt.widgets/Table - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_by_API%2Forg.eclipse.swt.widgets%2FTable"/>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_by_API/org.eclipse.swt.widgets/Table&amp;action=history"/>
		<updated>2026-04-23T19:26:54Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java_by_API/org.eclipse.swt.widgets/Table&amp;diff=350&amp;oldid=prev</id>
		<title> в 17:43, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_by_API/org.eclipse.swt.widgets/Table&amp;diff=350&amp;oldid=prev"/>
				<updated>2010-05-31T17:43:48Z</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:43, 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_by_API/org.eclipse.swt.widgets/Table&amp;diff=351&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_by_API/org.eclipse.swt.widgets/Table&amp;diff=351&amp;oldid=prev"/>
				<updated>2010-05-31T14:16:10Z</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;== new Table(Composite parent, int style) ==&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;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.FillLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
import org.eclipse.swt.widgets.Table;&lt;br /&gt;
import org.eclipse.swt.widgets.TableColumn;&lt;br /&gt;
import org.eclipse.swt.widgets.TableItem;&lt;br /&gt;
public class MainClass {&lt;br /&gt;
  public static void main(String[] a) {&lt;br /&gt;
    final Display d = new Display();&lt;br /&gt;
    final Shell s = new Shell(d);&lt;br /&gt;
    s.setSize(250, 200);&lt;br /&gt;
    s.setText(&amp;quot;A Table Shell Example&amp;quot;);&lt;br /&gt;
    s.setLayout(new FillLayout());&lt;br /&gt;
    Table t = new Table(s, SWT.BORDER);&lt;br /&gt;
    TableColumn tc1 = new TableColumn(t, SWT.CENTER);&lt;br /&gt;
    TableColumn tc2 = new TableColumn(t, SWT.CENTER);&lt;br /&gt;
    TableColumn tc3 = new TableColumn(t, SWT.CENTER);&lt;br /&gt;
    tc1.setText(&amp;quot;First Name&amp;quot;);&lt;br /&gt;
    tc2.setText(&amp;quot;Last Name&amp;quot;);&lt;br /&gt;
    tc3.setText(&amp;quot;Address&amp;quot;);&lt;br /&gt;
    tc1.setWidth(70);&lt;br /&gt;
    tc2.setWidth(70);&lt;br /&gt;
    tc3.setWidth(80);&lt;br /&gt;
    t.setHeaderVisible(true);&lt;br /&gt;
    TableItem item1 = new TableItem(t, SWT.NONE);&lt;br /&gt;
    item1.setText(new String[] { &amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, &amp;quot;Address 1&amp;quot; });&lt;br /&gt;
    TableItem item2 = new TableItem(t, SWT.NONE);&lt;br /&gt;
    item2.setText(new String[] { &amp;quot;C&amp;quot;, &amp;quot;D&amp;quot;, &amp;quot;Address 2&amp;quot; });&lt;br /&gt;
    TableItem item3 = new TableItem(t, SWT.NONE);&lt;br /&gt;
    item3.setText(new String[] { &amp;quot;E&amp;quot;, &amp;quot;F&amp;quot;, &amp;quot;Address 3&amp;quot; });&lt;br /&gt;
    s.open();&lt;br /&gt;
    while (!s.isDisposed()) {&lt;br /&gt;
      if (!d.readAndDispatch())&lt;br /&gt;
        d.sleep();&lt;br /&gt;
    }&lt;br /&gt;
    d.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&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;
== new Table(s, SWT.BORDER | SWT.CHECK | SWT.MULTI | SWT.FULL_SELECTION) ==&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;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.events.SelectionAdapter;&lt;br /&gt;
import org.eclipse.swt.events.SelectionEvent;&lt;br /&gt;
import org.eclipse.swt.layout.GridData;&lt;br /&gt;
import org.eclipse.swt.layout.GridLayout;&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;
import org.eclipse.swt.widgets.Table;&lt;br /&gt;
import org.eclipse.swt.widgets.TableColumn;&lt;br /&gt;
import org.eclipse.swt.widgets.TableItem;&lt;br /&gt;
import org.eclipse.swt.widgets.Text;&lt;br /&gt;
public class MainClass {&lt;br /&gt;
  public static void main(String[] a) {&lt;br /&gt;
    final Display d = new Display();&lt;br /&gt;
    final Shell s = new Shell(d);&lt;br /&gt;
    s.setSize(250, 200);&lt;br /&gt;
    GridLayout gl = new GridLayout();&lt;br /&gt;
    gl.numColumns = 4;&lt;br /&gt;
    s.setLayout(gl);&lt;br /&gt;
    final Table t = new Table(s, SWT.BORDER | SWT.CHECK | SWT.MULTI | SWT.FULL_SELECTION);&lt;br /&gt;
    final GridData gd = new GridData(GridData.FILL_BOTH);&lt;br /&gt;
    gd.horizontalSpan = 4;&lt;br /&gt;
    t.setLayoutData(gd);&lt;br /&gt;
    t.setHeaderVisible(true);&lt;br /&gt;
    final TableColumn tc1 = new TableColumn(t, SWT.LEFT);&lt;br /&gt;
    final TableColumn tc2 = new TableColumn(t, SWT.CENTER);&lt;br /&gt;
    final TableColumn tc3 = new TableColumn(t, SWT.CENTER);&lt;br /&gt;
    tc1.setText(&amp;quot;First Name&amp;quot;);&lt;br /&gt;
    tc2.setText(&amp;quot;Last Name&amp;quot;);&lt;br /&gt;
    tc3.setText(&amp;quot;Address&amp;quot;);&lt;br /&gt;
    tc1.setWidth(70);&lt;br /&gt;
    tc2.setWidth(70);&lt;br /&gt;
    tc3.setWidth(80);&lt;br /&gt;
    TableItem item1 = new TableItem(t, SWT.NONE);&lt;br /&gt;
    item1.setText(new String[] { &amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, &amp;quot;Address 1&amp;quot; });&lt;br /&gt;
    TableItem item2 = new TableItem(t, SWT.NONE);&lt;br /&gt;
    item2.setText(new String[] { &amp;quot;C&amp;quot;, &amp;quot;D&amp;quot;, &amp;quot;Address 2&amp;quot; });&lt;br /&gt;
    TableItem item3 = new TableItem(t, SWT.NONE);&lt;br /&gt;
    item3.setText(new String[] { &amp;quot;E&amp;quot;, &amp;quot;F&amp;quot;, &amp;quot;Address 3&amp;quot; });&lt;br /&gt;
    final Text find = new Text(s, SWT.SINGLE | SWT.BORDER);&lt;br /&gt;
    final Text replace = new Text(s, SWT.SINGLE | SWT.BORDER);&lt;br /&gt;
    final Button replaceBtn = new Button(s, SWT.BORDER | SWT.PUSH);&lt;br /&gt;
    replaceBtn.setText(&amp;quot;Replace&amp;quot;);&lt;br /&gt;
    replaceBtn.addSelectionListener(new SelectionAdapter() {&lt;br /&gt;
      public void widgetSelected(SelectionEvent e) {&lt;br /&gt;
        TableItem[] tia = t.getItems();&lt;br /&gt;
        for (int i = 0; i &amp;lt; tia.length; i++) {&lt;br /&gt;
          if (tia[i].getText(2).equals(find.getText())) {&lt;br /&gt;
            tia[i].setText(2, replace.getText());&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    });&lt;br /&gt;
    s.open();&lt;br /&gt;
    while (!s.isDisposed()) {&lt;br /&gt;
      if (!d.readAndDispatch())&lt;br /&gt;
        d.sleep();&lt;br /&gt;
    }&lt;br /&gt;
    d.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&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;
== Table: addListener(int type, Listener lis) ==&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.FillLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Event;&lt;br /&gt;
import org.eclipse.swt.widgets.Listener;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
import org.eclipse.swt.widgets.Table;&lt;br /&gt;
import org.eclipse.swt.widgets.TableColumn;&lt;br /&gt;
import org.eclipse.swt.widgets.TableItem;&lt;br /&gt;
public class MainClass {&lt;br /&gt;
  public static void main(String[] a) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    Shell shell = new Shell(display);&lt;br /&gt;
  shell.setLayout(new FillLayout());&lt;br /&gt;
    &lt;br /&gt;
    // Create a table and column&lt;br /&gt;
    final Table table = new Table(shell, SWT.VIRTUAL);&lt;br /&gt;
    table.setLinesVisible(true);&lt;br /&gt;
    table.setHeaderVisible(true);&lt;br /&gt;
    TableColumn tc = new TableColumn(table, SWT.NONE);&lt;br /&gt;
    tc.setText(&amp;quot;Virtual Value&amp;quot;);&lt;br /&gt;
    tc.setWidth(400);&lt;br /&gt;
    // Tell the table how many items it has&lt;br /&gt;
    table.setItemCount(100);&lt;br /&gt;
    &lt;br /&gt;
    // Provide the callback handler--this handler&lt;br /&gt;
    // is invoked when the table needs new rows&lt;br /&gt;
    table.addListener(SWT.SetData, new Listener() {&lt;br /&gt;
      public void handleEvent(Event event) {&lt;br /&gt;
        TableItem item = (TableItem) event.item;&lt;br /&gt;
        item.setText(&amp;quot;data&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
    });&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;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&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;
== Table: getColumnCount() ==&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;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.FillLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
import org.eclipse.swt.widgets.Table;&lt;br /&gt;
import org.eclipse.swt.widgets.TableColumn;&lt;br /&gt;
import org.eclipse.swt.widgets.TableItem;&lt;br /&gt;
public class MainClass {&lt;br /&gt;
  public static void main(String[] a) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    Shell shell = new Shell(display);&lt;br /&gt;
    shell.setLayout(new FillLayout());&lt;br /&gt;
    Table table = new Table(shell, SWT.MULTI | SWT.FULL_SELECTION);&lt;br /&gt;
    for (int i = 0; i &amp;lt; 5; i++) {&lt;br /&gt;
      TableColumn column = new TableColumn(table, SWT.NONE);&lt;br /&gt;
    }&lt;br /&gt;
    for (int i = 0; i &amp;lt; 10; i++) {&lt;br /&gt;
      TableItem item = new TableItem(table, SWT.NONE);&lt;br /&gt;
      for (int j = 0; j &amp;lt; 5; j++) {&lt;br /&gt;
        item.setText(j, &amp;quot;Row &amp;quot; + i + &amp;quot;, Column &amp;quot; + j);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    for (int i = 0, n = table.getColumnCount(); i &amp;lt; n; i++) {&lt;br /&gt;
      table.getColumn(i).pack();&lt;br /&gt;
    }&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;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&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;
== Table: getItem(Point p) ==&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;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.events.MouseAdapter;&lt;br /&gt;
import org.eclipse.swt.events.MouseEvent;&lt;br /&gt;
import org.eclipse.swt.graphics.Point;&lt;br /&gt;
import org.eclipse.swt.graphics.Rectangle;&lt;br /&gt;
import org.eclipse.swt.layout.FillLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
import org.eclipse.swt.widgets.Table;&lt;br /&gt;
import org.eclipse.swt.widgets.TableColumn;&lt;br /&gt;
import org.eclipse.swt.widgets.TableItem;&lt;br /&gt;
public class MainClass {&lt;br /&gt;
  public static void main(String[] a) {&lt;br /&gt;
    final Display d = new Display();&lt;br /&gt;
    final Shell shell = new Shell(d);&lt;br /&gt;
    shell.setSize(250, 200);&lt;br /&gt;
    shell.setLayout(new FillLayout());&lt;br /&gt;
    final Table table = new Table(shell, SWT.SINGLE | SWT.FULL_SELECTION&lt;br /&gt;
        | SWT.HIDE_SELECTION);&lt;br /&gt;
    table.setHeaderVisible(true);&lt;br /&gt;
    table.setLinesVisible(true);&lt;br /&gt;
    // Create five columns&lt;br /&gt;
    for (int i = 0; i &amp;lt; 5; i++) {&lt;br /&gt;
      TableColumn column = new TableColumn(table, SWT.CENTER);&lt;br /&gt;
      column.setText(&amp;quot;Column &amp;quot; + (i + 1));&lt;br /&gt;
      column.pack();&lt;br /&gt;
    }&lt;br /&gt;
    for (int i = 0; i &amp;lt; 5; i++) {&lt;br /&gt;
      // Create the row&lt;br /&gt;
      new TableItem(table, SWT.NONE);&lt;br /&gt;
    }&lt;br /&gt;
    table.addMouseListener(new MouseAdapter() {&lt;br /&gt;
      public void mouseDown(MouseEvent event) {&lt;br /&gt;
        Point pt = new Point(event.x, event.y);&lt;br /&gt;
        TableItem item = table.getItem(pt);&lt;br /&gt;
        if (item != null) {&lt;br /&gt;
          int column = -1;&lt;br /&gt;
          for (int i = 0, n = table.getColumnCount(); i &amp;lt; n; i++) {&lt;br /&gt;
            Rectangle rect = item.getBounds(i);&lt;br /&gt;
            if (rect.contains(pt)) {&lt;br /&gt;
              column = i;&lt;br /&gt;
              System.out.println(column);&lt;br /&gt;
              break;&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
      }&lt;br /&gt;
    });&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!d.readAndDispatch())&lt;br /&gt;
        d.sleep();&lt;br /&gt;
    }&lt;br /&gt;
    d.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&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;
== Table: setHeaderVisible(boolean visible) ==&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;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.FillLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
import org.eclipse.swt.widgets.Table;&lt;br /&gt;
import org.eclipse.swt.widgets.TableColumn;&lt;br /&gt;
import org.eclipse.swt.widgets.TableItem;&lt;br /&gt;
public class MainClass {&lt;br /&gt;
  public static void main(String[] a) {&lt;br /&gt;
    final Display d = new Display();&lt;br /&gt;
    final Shell s = new Shell(d);&lt;br /&gt;
    s.setSize(250, 200);&lt;br /&gt;
    s.setText(&amp;quot;A Table Shell Example&amp;quot;);&lt;br /&gt;
    s.setLayout(new FillLayout());&lt;br /&gt;
    Table t = new Table(s, SWT.BORDER);&lt;br /&gt;
    TableColumn tc1 = new TableColumn(t, SWT.CENTER);&lt;br /&gt;
    TableColumn tc2 = new TableColumn(t, SWT.CENTER);&lt;br /&gt;
    TableColumn tc3 = new TableColumn(t, SWT.CENTER);&lt;br /&gt;
    tc1.setText(&amp;quot;First Name&amp;quot;);&lt;br /&gt;
    tc2.setText(&amp;quot;Last Name&amp;quot;);&lt;br /&gt;
    tc3.setText(&amp;quot;Address&amp;quot;);&lt;br /&gt;
    tc1.setWidth(70);&lt;br /&gt;
    tc2.setWidth(70);&lt;br /&gt;
    tc3.setWidth(80);&lt;br /&gt;
    t.setHeaderVisible(true);&lt;br /&gt;
    TableItem item1 = new TableItem(t, SWT.NONE);&lt;br /&gt;
    item1.setText(new String[] { &amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, &amp;quot;Address 1&amp;quot; });&lt;br /&gt;
    TableItem item2 = new TableItem(t, SWT.NONE);&lt;br /&gt;
    item2.setText(new String[] { &amp;quot;C&amp;quot;, &amp;quot;D&amp;quot;, &amp;quot;Address 2&amp;quot; });&lt;br /&gt;
    TableItem item3 = new TableItem(t, SWT.NONE);&lt;br /&gt;
    item3.setText(new String[] { &amp;quot;E&amp;quot;, &amp;quot;F&amp;quot;, &amp;quot;Address 3&amp;quot; });&lt;br /&gt;
    s.open();&lt;br /&gt;
    while (!s.isDisposed()) {&lt;br /&gt;
      if (!d.readAndDispatch())&lt;br /&gt;
        d.sleep();&lt;br /&gt;
    }&lt;br /&gt;
    d.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&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;
== Table: setLinesVisible(boolean vi) ==&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;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.custom.CCombo;&lt;br /&gt;
import org.eclipse.swt.custom.TableEditor;&lt;br /&gt;
import org.eclipse.swt.events.ModifyEvent;&lt;br /&gt;
import org.eclipse.swt.events.ModifyListener;&lt;br /&gt;
import org.eclipse.swt.events.MouseAdapter;&lt;br /&gt;
import org.eclipse.swt.events.MouseEvent;&lt;br /&gt;
import org.eclipse.swt.events.SelectionAdapter;&lt;br /&gt;
import org.eclipse.swt.events.SelectionEvent;&lt;br /&gt;
import org.eclipse.swt.graphics.Color;&lt;br /&gt;
import org.eclipse.swt.graphics.Point;&lt;br /&gt;
import org.eclipse.swt.graphics.RGB;&lt;br /&gt;
import org.eclipse.swt.graphics.Rectangle;&lt;br /&gt;
import org.eclipse.swt.layout.FillLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.ColorDialog;&lt;br /&gt;
import org.eclipse.swt.widgets.Control;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
import org.eclipse.swt.widgets.Table;&lt;br /&gt;
import org.eclipse.swt.widgets.TableColumn;&lt;br /&gt;
import org.eclipse.swt.widgets.TableItem;&lt;br /&gt;
import org.eclipse.swt.widgets.Text;&lt;br /&gt;
public class MainClass {&lt;br /&gt;
  public static void main(String[] a) {&lt;br /&gt;
    final Display d = new Display();&lt;br /&gt;
    final Shell shell = new Shell(d);&lt;br /&gt;
    shell.setSize(250, 200);&lt;br /&gt;
    shell.setLayout(new FillLayout());&lt;br /&gt;
    // Number of rows and columns&lt;br /&gt;
    final int NUM = 5;&lt;br /&gt;
    // Create the table&lt;br /&gt;
    final Table table = new Table(shell, SWT.SINGLE | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);&lt;br /&gt;
    table.setHeaderVisible(true);&lt;br /&gt;
    table.setLinesVisible(true);&lt;br /&gt;
    for (int i = 0; i &amp;lt; NUM; i++) {&lt;br /&gt;
      TableColumn column = new TableColumn(table, SWT.CENTER);&lt;br /&gt;
      column.setText(&amp;quot;Column &amp;quot; + (i + 1));&lt;br /&gt;
      column.pack();&lt;br /&gt;
    }&lt;br /&gt;
    TableEditor[] colorEditors = new TableEditor[NUM];&lt;br /&gt;
    Button[] colorButtons = new Button[NUM];&lt;br /&gt;
    for (int i = 0; i &amp;lt; NUM; i++) {&lt;br /&gt;
      // Create the row&lt;br /&gt;
      final TableItem item = new TableItem(table, SWT.NONE);&lt;br /&gt;
      // Create the editor and button&lt;br /&gt;
      colorEditors[i] = new TableEditor(table);&lt;br /&gt;
      colorButtons[i] = new Button(table, SWT.PUSH);&lt;br /&gt;
      // Set attributes of the button&lt;br /&gt;
      colorButtons[i].setText(&amp;quot;Color...&amp;quot;);&lt;br /&gt;
      colorButtons[i].ruputeSize(SWT.DEFAULT, table.getItemHeight());&lt;br /&gt;
      // Set attributes of the editor&lt;br /&gt;
      colorEditors[i].grabHorizontal = true;&lt;br /&gt;
      colorEditors[i].minimumHeight = colorButtons[i].getSize().y;&lt;br /&gt;
      colorEditors[i].minimumWidth = colorButtons[i].getSize().x;&lt;br /&gt;
      colorEditors[i].setEditor(colorButtons[i], item, 0);&lt;br /&gt;
      colorButtons[i].addSelectionListener(new SelectionAdapter() {&lt;br /&gt;
        public void widgetSelected(SelectionEvent event) {&lt;br /&gt;
          System.out.println(&amp;quot;pressed&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
      });&lt;br /&gt;
    }&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!d.readAndDispatch())&lt;br /&gt;
        d.sleep();&lt;br /&gt;
    }&lt;br /&gt;
    d.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&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>