Rounded rectangles

I have just started using LWJGL and im stuck on trying to draw rounded rectangles like in Java2D, how would you go about this?