I am new with GUI in Java. However, I tried the program below but it won\'t work. It\'s a standalone application. I searched the web but couldn\'t find relevant answer. Please h
Instead of making a new usernamepass object in your actionPerformed method use this keyword for painting the current screen.
usernamepass
actionPerformed
this
try this in your code and it should work.
public void actionPerformed(ActionEvent ae){ this.repaint(); }