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
Joined: Feb 15, 2011
Posts: 16
posted
0
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
Joined: Oct 13, 2005
Posts: 32604
4
posted
0
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.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.