public void actionPerformed(ActionEvent ae) {
Dimension d = p.getPreferredSize();
if(d.width==0 || d.height==0) {
LayoutManager lm = p.getLayout();
Dimension d2 = lm.preferredLayoutSize(p);
p.setPreferredSize(d2); jTbTools.revalidate();
/*
// this piece of code adds in an animation
// for popping out the extra controls panel
Thread th = new Thread() {
int h = 0, w = 0;