JPasswordField KeyPress string length error?

后端 未结 5 1492
名媛妹妹
名媛妹妹 2020-12-20 21:04

I am trying to change background colors of a JPasswordField in Java Swing (Netbeans).

Here\'s what I have:

private void pstxtPasswordKeyPressed(java.         


        
5条回答
  •  星月不相逢
    2020-12-20 21:40

    Use

    private void pstxtPasswordKeyReleased(java.awt.event.KeyEvent evt) 
    

    Instead of

    private void pstxtPasswordKeyPressed(java.awt.event.KeyEvent evt) 
    

提交回复
热议问题