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?
Asked
Active
Viewed 1,027 times
4 Answers
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
-
nice code +1, that should be answer for http://stackoverflow.com/questions/7304017/how-to-add-sexy-on-off-sliders, hmmm reincatnate zoombie, – mKorbel Sep 05 '11 at 07:44
-
hmmm and someone want to live forever `Copyright © 2003-**2010** Stanislav Lapitsky. All Rights Reserved.` – mKorbel Sep 05 '11 at 07:46
-
Next year I will change to 2003-2012:-) – StanislavL Sep 05 '11 at 08:00
-
why waste time, let it at 10 anniversary, then 25.th and 50th. as with wwendings anniversary :-) – mKorbel Sep 05 '11 at 08:24
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