i need your help badly because i cannot solve this problem on my own. I am trying to create a GUI and want to draw something in it after pressing a button, but i seem to ha
When you resize your panel or change it position or minimize it and maximize it, a paint(...)
method is called that repaints the content. You have to overwrite this function and let it paint your line or what ever. To do this, you must probably save your drawing in a data-structure to be able to repaint it when every necessary.
The paint method is described here.