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

can't see the background color of a frame , why?  RSS feed

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
today in college i was trying to set the background color of a jframe but it only shows the color when i resize the frame and not when i just select the radio button
but if i set the background color of a panel instead frame it works fine
can you explain me why we cant see the background color of a frame ?

 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hint: What you see is not the frame, but the frame's content pane
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:Hint: What you see is not the frame, but the frame's content pane

so i guess this should work ?
but its not working , why?
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go through your code. Understand what it does. Read the BorderLayout tutorial if you need to understand the working of a BorderLayout.

Is any part of the contentPane visible in the GUi launched by that code?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!