• Post Reply Bookmark Topic Watch Topic
  • New Topic

Empty frame  RSS feed

 
andrea brugnerotto
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all i'm having a problem i cant solve by myself..

this is my drawer:



and this is my main


when i start the main metod appears aan empty frame witouth drawing the rectangle.. what is the problem?? sorry for my bad english
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Benvenuto al Ranch

Are you aware of the @Override annotation, which tells you whether you have overridden a method? Always use @Override when you are trying to override a method. Put @Override before public void printComponent and try compiling again, and the compiler should complain bitterly. Reason: spellign error. Not print, but paint.
By the way: give that method protected access, not public.
 
andrea brugnerotto
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Benvenuto al Ranch

Are you aware of the @Override annotation, which tells you whether you have overridden a method? Always use @Override when you are trying to override a method. Put @Override before public void printComponent and try compiling again, and the compiler should complain bitterly. Reason: spellign error. Not print, but paint.
By the way: give that method protected access, not public.


Thank you man!!! i'm a nob ^^ really really thanks!
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome
 
Piet Souris
Master Rancher
Posts: 2044
75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Give your RettangoloComponent a color. like

Greetz,
Piet
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!