This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hello, I have just started learning AWT and Swing so I've done my first application. It works fine except one part. Application draws shapes which user choose by clicking button. The problem is that paint method is covering all the rest. Moreover at the start of the application there is a transparent background and nothing is visible until I move mouse cursor above one of the hidden buttons and click it. Also neither labels nor panels are visible. If you cut this method from code menu is visible and looks like it should:
This is strange because it shouldn't even work at start of the application because flags are set on false. Please take a look at this and give me a hint