KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > matuschek > swing > SwingHelper


1 package net.matuschek.swing;
2
3 /*********************************************
4     Copyright (c) 2001 by Daniel Matuschek
5 *********************************************/

6
7 import javax.swing.*;
8
9 /**
10  * Some Swing helper functions (mostly static)
11  *
12  * @author Daniel Matuschek
13  * @version $Revision: 1.4 $
14  */

15 public class SwingHelper {
16
17   /**
18    * create a simple JTextField input field with a given length
19    */

20   public static JTextField createInputField(int length) {
21     JTextField field = new JTextField();
22     field.setColumns(length);
23     return field;
24   }
25
26 } // SwingHelper
27
Popular Tags