• Post Reply Bookmark Topic Watch Topic
  • New Topic

Building a Collapsible panel in java Swing  RSS feed

 
Satishkumar Ranganathan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

It would be great if anyone post a basic model script to but a collapsible panel in a java swing application ( with expand and collapse option)?

Satish
 
Les Morgan
Rancher
Posts: 767
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need a little more than what you have given unless this does it for you:


Satishkumar Ranganathan wrote:Hello,

It would be great if anyone post a basic model script to but a collapsible panel in a java swing application ( with expand and collapse option)?

Satish
 
Satishkumar Ranganathan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Les Morgan,

Thank you for you quick reply.

I have attached a picture of what I am try to do. It would be great if you can guide me through.

Thanks again!

Satish
Capture1.JPG
[Thumbnail for Capture1.JPG]
Model
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In pseudo code
1) Subclass JPanel
2) Set BorderLayout
3) Add JButton to North with approppriate triangular arrow image. Take out borders for slick efect
4) Add the content to Center.
5) Add action listener to the button to show/hide the content by setting the visibility (hint) of the conent

If it does not work as expected, post your SSCCE code so we can take a look
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!