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
I did not went through all of your code, but what is immediately visible is that you should not override the paintComponent
method without calling super.paintComponent
. And your commented out line calls super.paintComponents
(note the s), which is not the same.
I am also unsure what you mean 'when I resize the window', and how that is tied together with your Jpanel1.setSize( 1000, 1000 )
calls which appear all over your code. Your layout manager will take care of the size of the panel. You should not set that to a fixed size.