I have a question. I want to create a rocking shape that, by clicking on the button, will shift the panel (with its contents) to the left, so that the panel on the right replaces it with a smooth effect.
I tried to do it for a while, checking the size of the panel, and then minimizing it and showing the following:
while (jpanelprincipal1.getWidth() < 439 || jpanelprincipal1.getHeight() > 250) { int panel1width = jpanelprincipal1.getWidth(); int panel2height = jpanelprincipal1.getHeight(); jpanelprincipal1.setSize(panel1width -- , panel2height --); jpanelprincipal2.setSize(440,250); }
I used this trick in C #, but with Application.DoEvent (); (as it is obvious that it is not available in java).
Anyway, can I make a slide effect of 2 or more panels?
BTW: Sorry for my very bad English!
Thanks in advance, Luis Da Costa
source share