Horizontal Windowshading... (original) (raw)
I'm writing an app that should windowshade horizontally when the user clicks a button (ie. it should collapse back so only the button shows, and then when clicked again, it should expand back to full size). When I click the button though, nothing happens. I threw some debug output in, and it's handling the click and calling the functions it's supposed to; apparently my method for collapsing the windows is flawed somehow.
public void expand() { this.getContentPane().setSize((numapplets * AppletSettings.width) + AppletSettings.toggleWidth, AppletSettings.height); collapsed = false; }
public void collapse() { this.getContentPane().setSize(AppletSettings.toggleWidth, AppletSettings.height); collapsed = true; }
void jButtonShowHideToggle_actionPerformed(ActionEvent e) { System.out.println("Clicked.."); if (collapsed) { this.expand(); System.out.println("Expanding..."); } else { this.collapse(); System.out.println("Collapsing..."); } }
Is there some superior way of rolling up a window?
This is for a cute little app to provide functionality like KDE's panels.
I'm following this tutorial on the netbeans website for a simpleEE7App. I followed the instructions precisely but got an exception need help. :/…
anyone here?
It seems that you can override a concrete method and make it abstract. I actually came across some code that did this, so I had to check how it…