• Post Reply Bookmark Topic Watch Topic
  • New Topic

GUY only works when i minimize and maximize

 
Pedro Neves
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, i'm experiencing some problems in a method i made. Well, i have a method reading from a socket, the very first time it reads something (useful for my app) it calls a method (the one that has problems). the method called is implements some swing objects etc. Its working. The problem is.. sometimes, when it passes throught the method on the first time, it does not show anything. I mean.. nothing. and now the stupid part: if i minimize the app and maximize again its all right.. Does somebody can tell me on the first instance what is? If you want i may put some code here.

Thanks in advance

 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you add or remove components to an already visible container, you must revalidate() and repaint() it. The minimize and maximize trigger this revalidation and repainting, that's why you're seeing the components afterwards.
 
Greg Brannon
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's GUI = Graphical User Interface
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!