I have this problem , When i run my java app ,sometimes it doesn't load GUI components till i focus it or move the mouse over it .
ex : I have a JButton , sometimes it appears correctly and sometimes I have to move the mouse over it to be displayed .
You probably need to show a simple example (the absolute minimum required to reproduce the problem). My guess is that you are putting up your main frame, then building the area that has your JButton in it in the main thread (or at least not the EDT/GUI thread), and so the GUI doesn't see it/respond to its presence until it is forced to re-paint that area of the screen. All your GUI code should be done in the Event Dispatch Thread (EDT/GUI thread). SwingUtilities has a few methods (invokeLater() and invokeAndWait()) which may help you with this.
All that is a guess, though. We need to see your code to do anything but guess.