0

I have a JPanel and I want it so that whenever a user clicks on it, a sliding window appears just below the panel and giving more information to what is already in the JPanel. How can I do this?

aherlambang
  • 14,290
  • 50
  • 150
  • 253

4 Answers4

1

To put something on something, you can use a JLayeredPane or the zorder thing.

Istao
  • 7,425
  • 6
  • 32
  • 39
1

Try this http://java-sl.com/tip_slider.html

StanislavL
  • 56,971
  • 9
  • 68
  • 98
0

The requirements of your question are terrible so we can't give much detail.

If you want to to animation then use a Swing Timer. Each time the timer fires you change the height of the component to make it look likes its sliding.

camickr
  • 321,443
  • 19
  • 166
  • 288
  • sorry if the requirements aren't clear. basically what i want is to have a window that appears at the bottom of the panel when I press on the panel... as simple as that – aherlambang Nov 18 '10 at 21:37
  • Create a window and make it visible. Post your SSCCE (http://sscce.org) showing the problem. – camickr Nov 19 '10 at 00:28
0

Perhaps add a mouselistener to the jpanel, then upon mousepressed add an inner panel, or pull up a different card, or do whatever it is that works for your particular swing layout.

comp sci balla
  • 823
  • 2
  • 13
  • 29