Open daveray opened 12 years ago
Dave, this works for me for max!. It's possible that there are any number of problems with this code; I am new to both Swing and Seesaw. Note the code is almost entirely lifted from the original Google Groups question. As far as min!, it seems pack! would do about the same thing, unless we're looking for some kind of minimization to the dock or process bar or something.
(defn max! [frame](let [ge %28java.awt.GraphicsEnvironment/getLocalGraphicsEnvironment%29] %28. frame setExtendedState %28bit-or %28. frame getExtendedState%29 java.awt.Frame/MAXIMIZED_BOTH%29%29 %28. frame setSize %28. %28. ge getMaximumWindowBounds%29 getSize%29%29))
Hey. Sorry I haven't responded sooner. It's been a bit hectic.
This is a start. It's a bit tricky because it really bumps up against platform-specific issues like what "maximized" or "minimized" really means. I'd also want an API for serializing the current window state and restoring it. That's a pretty common thing to do when starting apps, i.e. put them back the way they were before.
So, if you'd like to pursue it more, go for it.
minimize, maximize, etc.