• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

BorderLayout question

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Marshal
Posts: 80656
477
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic