summaryrefslogtreecommitdiff
path: root/libs/FLib/TableLayout/doc/examples.html
blob: 7f8217ff4cb98de0b400ccc9c60b501bbd38dcad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/TableLayout.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>TableLayout - Examples</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
</head>

<body>
<p><img src="images/Logo.png" width="800" height="150" /></p>
<table width="800" border="0" cellspacing="0" cellpadding="10">
  <tr>
    <td width="150" align="left" valign="top" id="sidebar"> 
      <p><a href="index.html">Introduction</a></p>
      <p><a href="features.html">Features</a></p>
      <p><a href="screenshots.html">Screen<br />
        shots</a></p>
      <p><a href="tutorial.html">Tutorial</a></p>
      <p><a href="examples.html">Examples</a></p>
      <p><a href="api/index.html">API<br />
        documentation</a></p>
      <p><a href="https://sourceforge.net/project/showfiles.php?group_id=113939">Download</a></p>
      <p><a href="resources.html">Other<br />
        resources</a></p>
      <p><a href="../../index.html">Return to<br />
        FLib </a></p>
      <p><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=113939&amp;type=1" alt="SourceForge.net Logo" width="88" height="31" border="0" align="top" title="" /></a></p>
      <p><a href="http://www.jars.com/"><img src="http://www.jars.com/images/r750.gif" alt="Rated JARS Top 25%" width="104" height="56" border="0" align="top" title="" /></a></p>    </td>
    <td id="content" width="614" align="left" valign="top"><!-- InstanceBeginEditable name="content" -->
      <h1>Examples</h1>
      <p>There are two example programs provided for TableLayout.</p>
      <p>The <a href="example/Example1.java">Example1</a> program compares TableLayout
        with GridBagLayout. It uses the code found on the API page for GridBagLayout
        and then adds code to create
        the equivalent layout using TableLayout.</p>
      <p>I hope the TableLayout version is much easier to understand. It's definitely
        a lot shorter!</p>
      <p>The second program is called
        <a href="example/TableExplorer.java">TableExplorer</a>. While you are
        free to examine the code, it is really a tool you run to learn how to
        use the TableLayout.</p>
      <p>If you download the FLib source, you can use Ant to build and run
      the example programs:</p>
      <pre>cd TableLayout
ant runExample1
ant runTableExplorer</pre>
      <p>The Example1 class will display two windows, one created using GridBagLayout
        and the other using TableLayout. You can resize the windows to verify
        that
        the behavior
        is
      identical.</p>
      <p>When you run the TableExplorer program, it will display a text field
        at the bottom with the words &quot;Start Here!&quot; and an Add button
        next to it. You create JButton components by entering the component name
        (which
        also
        becomes its label) and pressing the Add button. Each component added
      shows up in the list above the text field.</p>
      <p>Selecting <em>Window / Show Preview Window</em> from the menu will bring up a
        window containing the JButtons. You can then set the table attributes
        and table cell defaults to control the table layout. You can also select
        a component from the list and set its cell attributes. Your changes should
        be reflected immediately in the preview window.</p>
      <p>You can also display a code window which will show you the code necessary
        to generate the displayed layout.</p>
      <!-- InstanceEndEditable --></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>