posted 15 years ago
Hi,
Main class:
JFrame Form class (Netbeans generated all of this code automatically):
JPanel Form class (Netbeans generated all of this code except for the overriden paintComponent() method):
I am using Netbeans 6.7.1.
The "Form" is the graphical interfaces Netbeans has, which you can drag and drop components onto and code is automatically generated.
In the code above, the paintComponent() method of the JPanel is overidden so it fills yellow. I coped this panel onto the JFrame, so when the program is run, the panel inside the JFrame should be yellow. But it is not changing colour.