This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BorderLayout question

 
john-paul York
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am doing a program that is suppose to do the following:

Create a JFrame that uses BorderLayout. Place a JButton in the center region. Each time the user clicks the JButton, change the background colour in one of the other regions.

I am just looking for a answer to a quick question, do you have to add buttons into every region to see them? I keep looking for information on how to kind of have a blank region so I can change the background color, but can't find anything(all the examples I find add buttons/text areas)? I am thinking I should be able to add something else other then a button or text area to the other regions that makes those regions show up and then I can work with them.

JP

 
john-paul York
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bah...I think I have it...JPanel....if I research JPanel this should put be in the right direction I am thinking?
 
Campbell Ritchie
Sheriff
Posts: 48642
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
john-paul York wrote: . . . do you have to add buttons into every region to see them?
No
. . . I should be able to add something else other then a button or text area to the other regions that makes those regions show up and then I can work with them.

JP

You appear to have worked that out already

I think this thread would sit better on our GUIs forum, so I shall move it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic