Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

884 Good

About Angex

  • Rank
  1. Angex

    JTextField Overrides KeyListener

    If you only want to know when the enter key is pressed, you can use an action listener instead. There is a good exmaple in the Oracle documentation.   In a nut-shell it's: final JTextField textField = new JTextField(20); textField.addActionListener( new ActionListener() { @Override public void actionPerformed(final ActionEvent evt) { // Enter pressed. } } ); If you do need to capture other key strokes, consider using a DocumentListener. KeyListeners can be troublesome when the registered component doesn't have focus.
  2. I can't see anything wrong with your OpenGL setup. I even tried running your sample code on my phone, and it works okay.   Do you get any runtime errors? Does the device support OpenGl ES 2? Maybe try ES 1 and see if it works.   Are you using any other threads? It's possible the flow of execution is stuck some where else in the code.
  3. In the validateLog() method, the prepared statement only has 2 placeholders, but you're supplying data to indices 2 & 3.   The index for placeholders starts from 1
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!