How to use a cell to enforce
a DOS 8.3 file name format

Add the following code to a constructor in your GUI class containing a JTable.

this.getScrollPaneTable().setDefaultRenderer(new String().getClass(), new JTextFieldTableCellRenderer());

JTextFieldFileName fileNameField = new JTextFieldFileName(8, false, false, false);

javax.swing.DefaultCellEditor fileNameEditor = new javax.swing.DefaultCellEditor(fileNameField);

this.getScrollPaneTable().setDefaultEditor(new String().getClass(),fileNameEditor);

Submitted by Michael Pell

At a glance...

JTextField
JTable
TableModel
TableCellRenderer
SortingJTableRows
JComboBox
CustomComboBoxModel
SwingWorkerThread
Send Email
Write To File
LDAP
Sort Your Objects
JTreeModel
DOSFileName

Please contact our Webmaster with questions or comments.
© Copyright 1998 Solutions Plus, Inc.  All rights reserved.

Home
About Us
Services
Contact Us
Hire Us!
Employment
Brochure
Site Index

Solutions Plus, Inc.

Internet Explorer 4.0 or higher

This page is best viewed with IE 4.0 or higher

Cast your vote!