As for transparency, you could go with a JTextField and use setOpaque(false). This should make it completely transparent.
If you want to have partial opacity (to reduce the contrast of the game content underneath), a custom component will be much easier than JTextField.
In theory you should be able to set a background color with a semitransparent alpha value (such as new Color(255,0,0,128) for a semitransparent red). However, I just tried to do that and it failed - the text field suddenly shows lots of repaint artifacts.
As for the key events, you could do the following: Whenever your game loop gets a KeyEvent and you want that to be processed by the JTextField, retrieve the ActionMap key for that event from the InputMap, then retrieve the Action from the ActionMap and execute the Action:
ActionEvent ae=new ActionEvent(textfield, KeyEvent.KEY_TYPED, e.getKeyChar()+"");
In this example e is the KeyEvent. However, as mentioned by the other posters, using JTextField is probably not worth the trouble, and in the long run a custom component is better suited.