summaryrefslogtreecommitdiff
path: root/examples/gnu/classpath
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2006-12-08 11:19:22 +0000
committerMark Wielaard <mark@klomp.org>2006-12-08 11:19:22 +0000
commitb77f88df258fa3ee1833555426a75a612b4fa9b4 (patch)
treebfe98f4fa2f33220577b9c4201629869c84a7398 /examples/gnu/classpath
parent9ebb135b531c52db2ef1c254372a506b12e22a04 (diff)
downloadclasspath-b77f88df258fa3ee1833555426a75a612b4fa9b4.tar.gz
2006-12-05 Roman Kennke <kennke@aicas.com>
* javax/swing/text/html/ImageView.java (imageUpdate): Use spans field to determine if the CSS width/height are set. Call safePreferenceChanged to protect view structure from threading issues. (spans): Made package private. (ImageView): Initialize loadOnDemand with false. (loadImage): Call Toolkit.prepareImage() to make sure we have our Observer registered. (safePreferenceChanged): New helper method. Calls preferenceChanged in a thread safe environment. 2006-12-05 Roman Kennke <kennke@aicas.com> * NEWS: Add entry about improved HTML support. 2006-12-05 Roman Kennke <kennke@aicas.com> * javax/swing/text/html/ImageView.java (ImageView): Initialize spans array here. (setPropertiesFromAttributes): Moved init of spans array to constructor. 2006-12-05 Roman Kennke <kennke@aicas.com> * javax/swing/text/html/BlockView.java (painter): Made package visible. * javax/swing/text/html/StyleSheet.java (translateBorder): New helper method. (translateHTMLToCSS): Add mappings for border attributes. * javax/swing/text/html/TableView.java Made class subclass of BlockView to get CSS goodness. (CellView.rowSpan): New field. (CellView.setPropertiesFromAttributes): Fetch rowspan. (RowView.overlap): New field. (RowView.rowIndex): New field. (RowView.layoutMajorAxis): Skip overlapping cells. (RowView.layoutMinorAxis): Layout cells that span more than 1 row. (numColumns): New field. (tmpRect): New field. (TableView): Initialize tmpRect. (calculateColumnRequirements): Adjusted and fixed for multirows. (getAlignment): Overridden to center tables. (paint): Overridden to fix clipping. (getStyleSheet): Made protected. (layoutMajorAxis): Invalidate rows. (setPropertiesFromAttributes): Made protected and call super. (updateGrid): Update the overlapping information for multirows. 2006-12-05 Roman Kennke <kennke@aicas.com> * javax/swing/text/html/HTMLEditorKit.java (HTMLFactory.create): Removed debug output. * javax/swing/text/html/InlineView.java (getBreakWeight): Likewise. * javax/swing/text/html/StyleSheet.java (addRule): Likewise. (ListPainter.paint): Removed debug output. 2006-12-06 Roman Kennke <kennke@aicas.com> * javax/swing/text/html/BlockView.java (getAlignment): Align blocks horizontally by the superclass. * javax/swing/text/html/HTMLEditorKit.java (HTMLFactory.create): Replace equals comparison by == for efficiency. Add mapping for misplaced tr, td and th tags. Include object mapping. * javax/swing/text/html/TableView.java (RowView.replace): Invalidate grid early. (gridValid): Initialize with false. (create): Only create RowView and CellView for correctly placed tags. Avoid unnecessary casts. (getAlignment): Removed. (replace): Invalidate grid early. 2006-12-06 Roman Kennke <kennke@aicas.com> * javax/swing/text/html/TableView.java (RowView.layoutMajorAxis): Check column index for invalid value. (updateGrid): Check column index for invalid value. 2006-12-06 Roman Kennke <kennke@aicas.com> * javax/swing/JEditorPane.java (getStream): Buffer the stream for efficiency. (setPage): Don't scroll the view at this point. * javax/swing/plaf/basic/BasicTextUI.java (RootView.paint): Call RootView's setSize to get synchronization. (RootView.setSize): Synchronize to prevent race in layout code. * javax/swing/text/AbstractDocument.java (notifyListeners): New field. (fireChangedUpdate): Track notifyListener field. (fireRemoveUpdate): Track notifyListener field. (fireIndertUpdate): Track notifyListener field. (writeLock): Check notifyListener and throw IllegalStateException. * javax/swing/text/View.java (preferenceChanged): Create local var for better thread safety and more efficiency. 2006-12-06 Roman Kennke <kennke@aicas.com> * examples/gnu/classpath/examples/icons/back.png, * examples/gnu/classpath/examples/icons/reload.png: New icons for the HTML browser. * examples/gnu/classpath/examples/swing/HtmlDemo.java (history): New field. Manages the browsing history. (HtmlDemo): Initialize history. (createContent): Set location and add history. Add toolbar. (createToolBar): New helper method. (main): Make default size bigger. * examples/gnu/classpath/examples/swing/frame1.html, * examples/gnu/classpath/examples/swing/frame2.html, * examples/gnu/classpath/examples/swing/frame3.html, * examples/gnu/classpath/examples/swing/frame4.html, * examples/gnu/classpath/examples/swing/frames.html, * examples/gnu/classpath/examples/swing/tables.html: New example pages. * examples/gnu/classpath/examples/swing/welcome.html Add a couple of links and new test pages. 2006-12-06 Roman Kennke <kennke@aicas.com> * examples/gnu/classpath/examples/swing/Demo.java (getIcon): Made package private. * examples/gnu/classpath/examples/swing/HtmlDemo.java (hyperlinkUpdate): Convert URL to string. 2006-12-06 Roman Kennke <kennke@aicas.com> * javax/swing/text/DefaultCaret.java (appear): Adjust visibility here. (setDotImpl): Don't adjust visibility here. (moveDotImpl): Don't adjust visibility here. 2006-12-06 Roman Kennke <kennke@aicas.com> * javax/swing/text/html/FormView.java (SubmitThread.postData): Implemented. (SubmitThread.run): Pass data to postData(). (actionPerformed): Reset form when reset button is activated. (createComponent): Add support for select lists and comboboxes. Don't set value of text and password fields here, this is done now in HTMLDocument for consistency. (getElementFormData): Add support for fetching form data from select lists and comboboxes as well as textareas. (getSelectData): New helper method. Fetches form data from select boxes. (getTextAreaData): New helper method. Fetches form data from textareas. (resetForm): New helper method. Resets the entire form. * javax/swing/text/html/HTMLDocument.java (HTMLReader.FormAction.end): Handle SELECT and OPTION tags. (HTMLReader.FormAction.start): Handle SELECT and OPTION tags. (HTMLReader.FormAction.setModel): Initialize text and password values here. Also, use the resetable special models. Group radio buttons into ButtonGroup for exclusive selection. (HTMLReader.FormTagAction): New class. Handles FORM tags. (HTMLReader.buttonGroups): New field. (HTMLReader.numOptions): New field. (HTMLReader.option): New field. (HTMLReader.selectModel): New field. (HTMLReader.textAreaDocument): Make ResetablePlainDocument. (HTMLReader.handleText): Handle OPTION text. (HTMLReader.initTags): Map FORM tags to FormTagAction. (HTMLReader.textAreaContent): Set initial content. * javax/swing/text/html/Option.java (Option): Make copy of attribute set. Initialize selected state. (getValue): Fetch value from attribute set. * javax/swing/text/html/ResetableModel.java: New interface. * javax/swing/text/html/ResetablePlainDocument.java: New class. Supports resetting the state. * javax/swing/text/html/ResetableToggleButtonModel.java: Likewise. * javax/swing/text/html/SelectComboBoxModel.java: Likewise. * javax/swing/text/html/SelectListModel.java: Likewise. 2006-12-06 Roman Kennke <kennke@aicas.com> * examples/gnu/classpath/examples/swing/BrowserEditorKit.java: New class. * examples/gnu/classpath/examples/swing/HtmlDemo.java (LoadActionListener): Call setPage() helper method. (createContent): Register tweaked editor kit. For FormSubmitEvents call submitForm(), otherwise setPage(). (postData): Helper method for posting form data. (setPage): Helper method for navigating to a new URL. (submitForm): Helper method for submitting a form. * examples/gnu/classpath/examples/swing/forms.html: Added text/password fields and select boxes. * examples/gnu/classpath/examples/swing/welcome.html: Fixed typo. 2006-12-07 Mark Wielaard <mark@klomp.org> * java/net/URL.java (URL(URL,String,URLStreamHandler,boolean)): New private constructor. (URL(URL,String,URLStreamHandler)): Call new constructor. (URL(URL,String)): Likewise. (URL(String)): Likewise. 2006-12-07 Mark Wielaard <mark@klomp.org> * javax/swing/JEditorPane.java (createEditorKitForContentType): Always load from system class loader.
Diffstat (limited to 'examples/gnu/classpath')
-rw-r--r--examples/gnu/classpath/examples/icons/back.pngbin0 -> 828 bytes
-rw-r--r--examples/gnu/classpath/examples/icons/reload.pngbin0 -> 1324 bytes
-rw-r--r--examples/gnu/classpath/examples/swing/BrowserEditorKit.java57
-rw-r--r--examples/gnu/classpath/examples/swing/Demo.java2
-rw-r--r--examples/gnu/classpath/examples/swing/HtmlDemo.java215
-rw-r--r--examples/gnu/classpath/examples/swing/forms.html37
-rw-r--r--examples/gnu/classpath/examples/swing/frame1.html41
-rw-r--r--examples/gnu/classpath/examples/swing/frame2.html42
-rw-r--r--examples/gnu/classpath/examples/swing/frame3.html42
-rw-r--r--examples/gnu/classpath/examples/swing/frame4.html41
-rw-r--r--examples/gnu/classpath/examples/swing/frames.html44
-rw-r--r--examples/gnu/classpath/examples/swing/tables.html66
-rw-r--r--examples/gnu/classpath/examples/swing/welcome.html17
13 files changed, 575 insertions, 29 deletions
diff --git a/examples/gnu/classpath/examples/icons/back.png b/examples/gnu/classpath/examples/icons/back.png
new file mode 100644
index 000000000..d320f26c6
--- /dev/null
+++ b/examples/gnu/classpath/examples/icons/back.png
Binary files differ
diff --git a/examples/gnu/classpath/examples/icons/reload.png b/examples/gnu/classpath/examples/icons/reload.png
new file mode 100644
index 000000000..04c575002
--- /dev/null
+++ b/examples/gnu/classpath/examples/icons/reload.png
Binary files differ
diff --git a/examples/gnu/classpath/examples/swing/BrowserEditorKit.java b/examples/gnu/classpath/examples/swing/BrowserEditorKit.java
new file mode 100644
index 000000000..f61275e57
--- /dev/null
+++ b/examples/gnu/classpath/examples/swing/BrowserEditorKit.java
@@ -0,0 +1,57 @@
+/* BrowserEditorKit.java -- A tweaked editor kit for the browser
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.examples.swing;
+
+import javax.swing.text.html.HTMLEditorKit;
+
+/**
+ * A tweaked editor kit for out browser.
+ */
+public class BrowserEditorKit
+ extends HTMLEditorKit
+{
+ public BrowserEditorKit()
+ {
+ super();
+ // Turn off automatic form submission so that we can receive notification
+ // instead and can update out location field.
+ setAutoFormSubmission(false);
+ }
+}
+
diff --git a/examples/gnu/classpath/examples/swing/Demo.java b/examples/gnu/classpath/examples/swing/Demo.java
index 6570cdbad..3c7f0b887 100644
--- a/examples/gnu/classpath/examples/swing/Demo.java
+++ b/examples/gnu/classpath/examples/swing/Demo.java
@@ -66,7 +66,7 @@ public class Demo
return getIcon("/gnu/classpath/examples/icons/big-" + s + ".png", s);
}
- private static Icon getIcon(String location, String name)
+ static Icon getIcon(String location, String name)
{
URL url = Demo.class.getResource(location);
if (url == null) System.err.println("WARNING " + location + " not found.");
diff --git a/examples/gnu/classpath/examples/swing/HtmlDemo.java b/examples/gnu/classpath/examples/swing/HtmlDemo.java
index 4cbf3ce47..35a9df290 100644
--- a/examples/gnu/classpath/examples/swing/HtmlDemo.java
+++ b/examples/gnu/classpath/examples/swing/HtmlDemo.java
@@ -43,19 +43,28 @@ import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.net.MalformedURLException;
import java.net.URL;
+import java.net.URLConnection;
+import java.util.LinkedList;
import javax.swing.BoxLayout;
+import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JComponent;
+import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.JTextPane;
+import javax.swing.JToolBar;
import javax.swing.SwingUtilities;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
+import javax.swing.text.html.FormSubmitEvent;
/**
* Parses and displays HTML content.
@@ -74,11 +83,11 @@ public class HtmlDemo extends JPanel
String urlStr = url.getText();
try
{
- html.setPage(url.getText());
+ setPage(new URL(url.getText()));
}
- catch (IOException ex)
+ catch (MalformedURLException ex)
{
- System.err.println("exception while loading: " + ex);
+ // Do something more useful here.
ex.printStackTrace();
}
}
@@ -98,10 +107,17 @@ public class HtmlDemo extends JPanel
int n;
+ /**
+ * The browsing history.
+ *
+ * Package private to avoid accessor method.
+ */
+ LinkedList history;
+
public HtmlDemo()
{
super();
- html.setContentType("text/html"); // not now.
+ history = new LinkedList();
createContent();
}
@@ -115,23 +131,24 @@ public class HtmlDemo extends JPanel
{
setLayout(new BorderLayout());
+ JEditorPane.registerEditorKitForContentType("text/html",
+ BrowserEditorKit.class.getName());
html.setEditable(false);
html.addHyperlinkListener(new HyperlinkListener()
{
public void hyperlinkUpdate(HyperlinkEvent event)
{
- URL u = event.getURL();
- if (u != null)
+ if (event instanceof FormSubmitEvent)
{
- url.setText(u.toString());
- try
- {
- html.setPage(u);
- }
- catch (IOException ex)
+ submitForm((FormSubmitEvent) event);
+ }
+ else
+ {
+ URL u = event.getURL();
+ if (u != null)
{
- ex.printStackTrace();
+ setPage(u);
}
}
}
@@ -148,24 +165,93 @@ public class HtmlDemo extends JPanel
JButton loadButton = new JButton("go");
urlPanel.add(loadButton);
loadButton.addActionListener(action);
- add(urlPanel, BorderLayout.NORTH);
- add(scroller, BorderLayout.CENTER);
+
+ // Setup control panel.
+ JToolBar controlPanel = createToolBar();
+ JPanel browserPanel = new JPanel();
+ browserPanel.setLayout(new BorderLayout());
+ browserPanel.add(urlPanel, BorderLayout.NORTH);
+ browserPanel.add(scroller, BorderLayout.CENTER);
+ add(controlPanel, BorderLayout.NORTH);
+ add(browserPanel, BorderLayout.CENTER);
// Load start page.
- URL startpage = getClass().getResource("welcome.html");
try
{
+ URL startpage = getClass().getResource("welcome.html");
html.setPage(startpage);
url.setText(startpage.toString());
+ history.addLast(startpage);
}
- catch (IOException ex)
+ catch (Exception ex)
{
- System.err.println("couldn't load page: " + startpage);
+ System.err.println("couldn't load page: "/* + startpage*/);
+ ex.printStackTrace();
}
-
- setPreferredSize(new Dimension(600, 400));
+ setPreferredSize(new Dimension(800, 600));
}
+
+ /**
+ * Creates the toolbar with the control buttons.
+ *
+ * @return the toolbar with the control buttons
+ */
+ JToolBar createToolBar()
+ {
+ JToolBar tb = new JToolBar();
+ Icon backIcon = Demo.getIcon("/gnu/classpath/examples/icons/back.png",
+ "back");
+ JButton back = new JButton(backIcon);
+ back.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent ev)
+ {
+ if (history.size() > 1)
+ {
+ URL last = (URL) history.removeLast();
+ last = (URL) history.getLast();
+ url.setText(last.toString());
+ try
+ {
+ html.setPage(last);
+ }
+ catch (IOException ex)
+ {
+ // Do something more useful.
+ ex.printStackTrace();
+ }
+ }
+ }
+ });
+ tb.add(back);
+ Icon reloadIcon = Demo.getIcon("/gnu/classpath/examples/icons/reload.png",
+ "reload");
+ JButton reload = new JButton(reloadIcon);
+ reload.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent ev)
+ {
+ if (history.size() > 0)
+ {
+ URL last = (URL) history.getLast();
+ url.setText(last.toString());
+ try
+ {
+ html.setPage(last);
+ }
+ catch (IOException ex)
+ {
+ // Do something more useful.
+ ex.printStackTrace();
+ }
+ }
+ }
+ });
+ tb.add(reload);
+ return tb;
+ }
+
/**
* The executable method to display the editable table.
*
@@ -182,13 +268,100 @@ public class HtmlDemo extends JPanel
HtmlDemo demo = new HtmlDemo();
JFrame frame = new JFrame();
frame.getContentPane().add(demo);
- frame.setSize(new Dimension(700, 480));
+ frame.setSize(new Dimension(750, 480));
frame.setVisible(true);
}
});
}
/**
+ * Helper method to navigate to a new URL.
+ *
+ * @param u the new URL to navigate to
+ */
+ void setPage(URL u)
+ {
+ try
+ {
+ url.setText(u.toString());
+ html.setPage(u.toString());
+ history.addLast(u);
+ }
+ catch (IOException ex)
+ {
+ // Do something more useful here.
+ ex.printStackTrace();
+ }
+ }
+
+ /**
+ * Submits a form when a FormSubmitEvent is received. The HTML API
+ * provides automatic form submit but when this is enabled we don't
+ * receive any notification and can't update our location field.
+ *
+ * @param ev the form submit event
+ */
+ void submitForm(FormSubmitEvent ev)
+ {
+ URL url = ev.getURL();
+ String data = ev.getData();
+ FormSubmitEvent.MethodType method = ev.getMethod();
+ if (method == FormSubmitEvent.MethodType.POST)
+ {
+ try
+ {
+ URLConnection conn = url.openConnection();
+ postData(conn, data);
+ }
+ catch (IOException ex)
+ {
+ // Deal with this.
+ ex.printStackTrace();
+ }
+ }
+ else
+ {
+ try
+ {
+ url = new URL(url.toString() + "?" + data);
+ }
+ catch (MalformedURLException ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ setPage(url);
+ }
+
+ /**
+ * Posts the form data for forms with HTTP POST method.
+ *
+ * @param conn the connection
+ * @param data the form data
+ */
+ private void postData(URLConnection conn, String data)
+ {
+ conn.setDoOutput(true);
+ PrintWriter out = null;
+ try
+ {
+ out = new PrintWriter(new OutputStreamWriter(conn.getOutputStream()));
+ out.print(data);
+ out.flush();
+ }
+ catch (IOException ex)
+ {
+ // Deal with this!
+ ex.printStackTrace();
+ }
+ finally
+ {
+ if (out != null)
+ out.close();
+ }
+ }
+
+ /**
* Returns a DemoFactory that creates a HtmlDemo.
*
* @return a DemoFactory that creates a HtmlDemo
diff --git a/examples/gnu/classpath/examples/swing/forms.html b/examples/gnu/classpath/examples/swing/forms.html
index 2cfdb4bcc..010a94c93 100644
--- a/examples/gnu/classpath/examples/swing/forms.html
+++ b/examples/gnu/classpath/examples/swing/forms.html
@@ -41,6 +41,7 @@ exception statement from your version. -->
<title>HTML text styles</title>
</head>
<body>
+ <form>
<a href="welcome.html">Back to start page</a>
<h1>Some form elements</h1>
<h2>Textarea</h2>
@@ -49,6 +50,12 @@ exception statement from your version. -->
that has a size of 30 columns and 5 rows
</textarea>
+ <h2>Input fields</h2>
+ <p>
+ <input type="text" value="This is a normal textfield">
+ <input type="password" value="secret password">
+ </p>
+
<h2>Buttons</h2>
<p>
<input type="submit"></input>
@@ -58,12 +65,34 @@ exception statement from your version. -->
<h2>Checkboxes and Radiobuttons</h2>
<p>
- <input type="checkbox">Check this!</input>
- <input type="checkbox">Or this</input>
+ <input type="checkbox" name="2">Check this!</input>
+ <input type="checkbox" name="2">Or this</input>
+ </p>
+ <p>
+ <input type="radio" name="1">A radio button</input>
+ <input type="radio" name="1">Another radio</input>
+ </p>
+ <h2>Select lists and combo boxes</h2>
+ <p>
+ <select>
+ <option>Value1</option>
+ <option>Value2</option>
+ <option>Value3</option>
+ <option label="Labeled value 4">Value4</option>
+ <option>Value5</option>
+ <option>Value6</option>
+ </select>
</p>
<p>
- <input type="radio">A radio button</input>
- <input type="radio">Another radio</input>
+ <select size="3">
+ <option>Value1</option>
+ <option>Value2</option>
+ <option>Value3</option>
+ <option label="Labeled value 4">Value4</option>
+ <option>Value5</option>
+ <option>Value6</option>
+ </select>
</p>
+ </form>
</body>
</html> \ No newline at end of file
diff --git a/examples/gnu/classpath/examples/swing/frame1.html b/examples/gnu/classpath/examples/swing/frame1.html
new file mode 100644
index 000000000..b9150592f
--- /dev/null
+++ b/examples/gnu/classpath/examples/swing/frame1.html
@@ -0,0 +1,41 @@
+<!-- frame1.html -- Some HTML stuff to show Swing HTML
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+<html>
+<body>
+<h1>Top Left Frame</h1>
+</body>
+</html>
diff --git a/examples/gnu/classpath/examples/swing/frame2.html b/examples/gnu/classpath/examples/swing/frame2.html
new file mode 100644
index 000000000..9dbf33c5a
--- /dev/null
+++ b/examples/gnu/classpath/examples/swing/frame2.html
@@ -0,0 +1,42 @@
+<!-- frame2.html -- Some HTML stuff to show Swing HTML
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+<html>
+<body>
+<h1>Top Right
+ Frame</h1>
+</body>
+</html>
diff --git a/examples/gnu/classpath/examples/swing/frame3.html b/examples/gnu/classpath/examples/swing/frame3.html
new file mode 100644
index 000000000..e677bd6a1
--- /dev/null
+++ b/examples/gnu/classpath/examples/swing/frame3.html
@@ -0,0 +1,42 @@
+<!-- frame3.html -- Some HTML stuff to show Swing HTML
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+<html>
+<body>
+<h1>Bottom Left Frame</h1>
+</body>
+</html>
+
diff --git a/examples/gnu/classpath/examples/swing/frame4.html b/examples/gnu/classpath/examples/swing/frame4.html
new file mode 100644
index 000000000..1da53b101
--- /dev/null
+++ b/examples/gnu/classpath/examples/swing/frame4.html
@@ -0,0 +1,41 @@
+<!-- frame4.html -- Some HTML stuff to show Swing HTML
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+<html>
+<body>
+<h1>Bottom Left Frame</h1>
+</body>
+</html>
diff --git a/examples/gnu/classpath/examples/swing/frames.html b/examples/gnu/classpath/examples/swing/frames.html
new file mode 100644
index 000000000..e7e2bf87c
--- /dev/null
+++ b/examples/gnu/classpath/examples/swing/frames.html
@@ -0,0 +1,44 @@
+<!-- frames.html -- Some HTML stuff to show Swing HTML
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+<html>
+<frameset cols="40%,60%" rows="20%,80%">
+ <frame src="frame1.html">
+ <frame src="frame2.html">
+ <frame src="frame3.html">
+ <frame src="frame4.html">
+</frameset>
+</html> \ No newline at end of file
diff --git a/examples/gnu/classpath/examples/swing/tables.html b/examples/gnu/classpath/examples/swing/tables.html
new file mode 100644
index 000000000..af908e1ab
--- /dev/null
+++ b/examples/gnu/classpath/examples/swing/tables.html
@@ -0,0 +1,66 @@
+<!-- tables.html -- Some HTML stuff to show Swing HTML
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+
+<html>
+
+<head>
+ <title>HTML text styles</title>
+ </head>
+ <body>
+<h1>Table examples</h1>
+<h2>Table with grid and mixed rowspan/colspan</h2>
+ <table border="1">
+ <tr>
+ <td width="30%" colspan="2">Spans two columns</td>
+ <td rowspan="3">Spans three rows</td>
+ </tr>
+ <tr>
+ <td rowspan="2">Spans two rows</td>
+ <td>This is the center</td>
+ </tr>
+ <tr>
+ <td>This should be in the middle of row number 3</td>
+ </tr>
+ <tr>
+ <td>A small one cell box</td>
+ <td colspan="2" rowspan="2">Spans two x two cells</td>
+ </tr>
+ <tr>
+ <td>Another small one cell box</td>
+ </tr>
+ </table>
+</body></html>
diff --git a/examples/gnu/classpath/examples/swing/welcome.html b/examples/gnu/classpath/examples/swing/welcome.html
index 62fb51429..8bc987494 100644
--- a/examples/gnu/classpath/examples/swing/welcome.html
+++ b/examples/gnu/classpath/examples/swing/welcome.html
@@ -40,13 +40,24 @@ exception statement from your version. -->
<title>GNU Classpath HTML Browser</title>
</head>
<body>
- <img src="../icons/badge.png">
+ <img src="../icons/badge.png" width="100" height="100">
<h1>Welcome to GNU Classpath</h1>
- <p>These pages are here to demonstrate the HTML rendering capabilities
- of GNU Classpath's Swing.</p>
+ <h2>A couple of websites that you might want to try out</h2>
+ <ul>
+ <li><a href="http://www.gnu.org/software/classpath/">GNU Classpath homepage</a></li>
+ <li><a href="http://planet.classpath.org">Planet Classpath</a></li>
+ <li><a href="http://developer.classpath.org">GNU Classpath developer pages</a></li>
+ <li><a href="http://www.google.com">Google</a></li>
+ </ul>
+
+ <h2>Testpages</h2>
+ <p>These few pages are here to demonstrate and test the HTML rendering
+ capabilities of GNU Classpath's Swing.</p>
<ul>
<li><a href="textstyles.html">Text styles</li>
<li><a href="forms.html">Form elements</li>
+ <li><a href="tables.html">Tables</li>
+ <li><a href="frames.html">Frames</li>
</ul>
</body>
</html> \ No newline at end of file