tags:

views:

45

answers:

2

I make an Application in java and draw rectangle. When I search from combobox the rectangle is under the combobox and when I close combobox some parts of the rectangle which was under the combobox is deleted. How can I make rectangle to be visible after the combobox was closed.

A: 

Suggest you read this tutorial. As suggested there, call the super.paint(g) after your own painting.

John
A: 

repaint the panel in which the rectangle is visible

Arivu2020