• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting a problem ,can't see the button

 
budsy remo
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi , i was testing out card layout.

What i want in my application is three panels

At first i want the frame to be Divided into two panels and then add buttons on it . This is where the problem is coming. The button is not visible on the panel . It is visible when i remove the second panel . Another question is that can i control the size of the button on it?

here's the full code :

Any help would be appreciated.
 
Rob Camick
Ranch Hand
Posts: 2613
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your last question you where given a link to a section in the Swing tutorial. If you look at the table of contents you will find a section on "How to Use Card Layout" which has a working example.
 
Kumar Karunakaran
Greenhorn
Posts: 3
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friend,

The CardLayout is like a bunch of cards placed one over the other. So when you remove the one on the top you can see the one under it. To divide a panel into 3 you have to use a panel which implements GridLayout. The grid must have one row and three columns. In each you have to use seperate panels. That will work. Try it out. Anyway the CardLayout will not work.

Regards

Sincerelibran
 
budsy remo
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it worked , i was able to use cardlayout .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic