title: how can you lock a JTextFeild to only accept numeric values and decimals
body: <p>ok so im making a basic bank program and im trying to figure out how to lock the user input to only numbers and decimals and then use those numbers as deposits  and withdrawals (the buttons have not been set up yet) is it possible to lock the textFeild to numbers or will i have to use another input source?</p>
  
  <pre><code>import javax.swing.JButton;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JTextField;
  
  public class Interface {
  
      public static void main (String[]args){     
  
          JFrame f=new JFrame("User Bank (Version 0.03.5)");
  
          double ammount = 0;
          double Depo = 0;
          double Withd= 0;
          double Interest= 4; 
  
          JLabel actions;
          actions=new JLabel("Last transactions");
          actions.setBounds(950,325,600,200);
          f.add(actions);
  
          JLabel Interst;
          Interst=new JLabel("NOTE THAT ALL TRANSACTIONS HAVE A 4% FEE");
          Interst.setBounds(950,250,600,200);
          f.add(Interst);
  
          JLabel LastDepo;
          LastDepo=new JLabel("Your last Deposite was "+Depo+" with the 4% transactions rate made it "+(((Depo/100)*4)+Depo));
          LastDepo.setBounds(950,400,600,200);
          f.add(LastDepo);
  
          JLabel LastWith;
          LastWith=new JLabel("Your last Withdrawel was "+Withd+" with the 4% transactions rate made it "+(((-Withd/100)*Interest)+Withd));
          LastWith.setBounds(950,500,600,200);
          f.add(LastWith);
  
          JLabel AmmountL;
          AmmountL=new JLabel("ammount");
          AmmountL.setBounds(340,300,300,100);
          f.add(AmmountL);
  
          JTextField depot=new JTextField();
          depot.setBounds(400,450,95,15);
          f.add(depot);
  
          JButton depo=new JButton("Deposite");
          depo.setBounds(400,500,95,30);
          f.add(depo);
  
          JTextField WithdT=new JTextField();
          WithdT.setBounds(400,550,95,15);
          f.add(WithdT);  
  
          JButton withd=new JButton("WithDraw");
          withd.setBounds(400,600,95,30);
          f.add(withd);
  
          JLabel Ammount;
          Ammount=new JLabel("$"+(ammount+Depo-Withd));
          Ammount.setBounds(400,300,300,100);
          f.add(Ammount);
  
          f.setSize(1920,1080);
          f.setLayout(null);
          f.setVisible(true);
          f.setResizable(false);
  
      }
  
  }
  </code></pre>