This gives the HtmlDemo a reasonable initial size and loads the correct
welcome page.
2006-11-06 Roman Kennke <[EMAIL PROTECTED]>
* examples/gnu/classpath/examples/swing/HtmlDemo.java:
Fixed initial window size and start document.
/Roman
Index: examples/gnu/classpath/examples/swing/HtmlDemo.java
===================================================================
RCS file: /cvsroot/classpath/classpath/examples/gnu/classpath/examples/swing/HtmlDemo.java,v
retrieving revision 1.6
diff -u -1 -5 -r1.6 HtmlDemo.java
--- examples/gnu/classpath/examples/swing/HtmlDemo.java 6 Nov 2006 16:26:52 -0000 1.6
+++ examples/gnu/classpath/examples/swing/HtmlDemo.java 6 Nov 2006 20:30:21 -0000
@@ -140,40 +140,42 @@
JScrollPane scroller = new JScrollPane(html);
JPanel urlPanel = new JPanel();
urlPanel.setLayout(new BoxLayout(urlPanel, BoxLayout.X_AXIS));
url.setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
LoadActionListener action = new LoadActionListener();
url.addActionListener(action);
urlPanel.add(url);
JButton loadButton = new JButton("go");
urlPanel.add(loadButton);
loadButton.addActionListener(action);
add(urlPanel, BorderLayout.NORTH);
add(scroller, BorderLayout.CENTER);
// Load start page.
- URL startpage = getClass().getResource("forms.html");
+ URL startpage = getClass().getResource("welcome.html");
try
{
html.setPage(startpage);
url.setText(startpage.toString());
}
catch (IOException ex)
{
System.err.println("couldn't load page: " + startpage);
}
+
+ setPreferredSize(new Dimension(600, 400));
}
/**
* The executable method to display the editable table.
*
* @param args
* unused.
*/
public static void main(String[] args)
{
SwingUtilities.invokeLater
(new Runnable()
{
public void run()
{