like, should I use separate thread for each menu screen

Not unless you're prepared for long nights of debugging and drining coffee!
Create a class called a Screen, which inherits from Displayable. This displayable should hold any components you need (which you write yourself).
All of the components the Screen holds, should draw themsleves to an Image which you have precreated to the size of the screen:
1 2 3
| Image bufferImage = Image.createImage(getWidth(), getHeight()); Graphics bufferGraphics = bufferImage.getGraphics(); |
Whenever a component needs to paint, paint onto that bufferImage.
You then only need to paint the bufferImage in your Screens paint method:
1 2 3
| public void paint(Graphics g) { g.drawImage(bufferImage, 0, 0, Graphics.TOP | Graphics.LEFT); } |
This technique is called Double Buffering and will avoid flickering when painting. I have seen flickering when changing Displayable's through the
though.
Keep your program single threaded at ALL times, unless you do lengthy calculations that would lock the UI, or do network communication.