Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

draw panel and jbutton not showing  RSS feed

 
Carolin Sha
Ranch Hand
Posts: 68
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Please see code below, Not sure why the draw panel and jbutton are not showing. any help would be appreciated.

 
Campbell Ritchie
Sheriff
Posts: 53773
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our GUIs forum.

You called setVisible before you added the panel and button. You should call setVisible last (or use revalidate).
 
Carolin Sha
Ranch Hand
Posts: 68
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I moved setVisible however I am still not seeing the draw panel and jbutton.
 
Carolin Sha
Ranch Hand
Posts: 68
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Thanks, I finally got it to work.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!