class FloatJTextFieldFilter extends PlainDocument {

        public static final String POSITIVE_FLOAT_ACCEPTED_CHARS = "0123456789.";

        @Override
        public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
            for (int i = 0; i < str.length(); i++) {
                if (!POSITIVE_FLOAT_ACCEPTED_CHARS.contains(String.valueOf(str.charAt(i)))) {
                    return;
                }
            }

            if (str.contains(".")) {
                if (getText(0, getLength()).contains(".")) {
                    return;
                }
            }

            super.insertString(offs, str, a);
        }

        @Override
        public void remove(int offs, int len) throws BadLocationException {<FILL_FUNCTION_BODY>}
    }

            String str = getText(0, getLength());
            str = str.substring(0, offs) + str.substring(offs + len);
            if (!str.equals("") && !str.equals(".")) {
                super.remove(offs, len);
            }
        
<methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void setUI(javax.swing.plaf.PanelUI) ,public void updateUI() <variables>private static final java.lang.String uiClassID