So it looks like the simplest solution is to just check if the value is equal to "n" (110) and consume it. Thanks again to Norm and Greg.
import java.awt.event.KeyEvent;
import...
Type: Posts; User: antihero.mc
So it looks like the simplest solution is to just check if the value is equal to "n" (110) and consume it. Thanks again to Norm and Greg.
import java.awt.event.KeyEvent;
import...
Sorry. Still pretty green. I don't know where you're finding that.
--- Update ---
AHHHH ok thank you both.
Hmmm. None are 'n'. All of the KeyEvents are actual integers. But it seems like somehow allowing decimals through is also allowing the "n" key through and even consuming the "n" key specifically...
Thanks for the quick reply. Here it is:
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JFrame;
import javax.swing.JPanel;
import...
I am trying to create an event handler for two JTextFields to only allow numerical input. It consumes all letter but for some reason the "n" key still gets through. I have the spaghetti code below....