• Post Reply Bookmark Topic Watch Topic
  • New Topic

Expandable Button in Swing

 
Syed Basha
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we create Expandable Button in Swing.
As we click one Button ( it has to expand) the remaining other two button has to move down (leaving space for 1st button expansion)
 
Carlos Failde
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's some hints for ya pardner:
We would add an actionlistener to the button whose actionPerformed
method queries the current size of the button and sets it to a larger
size. A JButton is a JComponent which has methods concerning size.
Now all these buttons must be in some kind of a Container, and a
Container is reponsible for how things look...
You'll find the methods you need in the api.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!