How do I create a Java messagebox an on form messagebox? Stuck

I know how to create a regular popup messagebox as below:

JOptionPane.showMessageDialog(this, "Couldn't log in");
But I don't know how to create one as below, I'm stuck on how we create this sort of messagebox..

Name:  NJPoR.png
Views: 109
Size:  9.2 KB