minimize

How to minimize a JFrame window from Java?

为君一笑 提交于 2019-11-26 18:23:18
问题 In my Java app, I have a JFrame window, how can I minimize it from my Java program ? 回答1: minimize with frame.setState(Frame.ICONIFIED) restore with frame.setState(Frame.NORMAL) 回答2: Minimize: frame.setState(Frame.ICONIFIED); Another way to minimize: frame.setExtendedState(JFrame.ICONIFIED); Normal size: frame.setState(Frame.NORMAL); Another way to normal size: frame.setExtendedState(JFrame.NORMAL); Maximize: frame.setState(Frame.MAXIMIZED_BOTH); Another way to maximize: frame

Painted content invisible while resizing in Java

不问归期 提交于 2019-11-26 16:47:58
Please note I haven't tested this on a Windows-machine only on a Mac-machine. I'm not so sure whether this also occurs on a Windows-machine... When I resize my Java-application the content is invisible. I already found a way to fix it after resizing it, but not while the user is resizing the window. I'm not using Swing or something because it makes my binary so slow (in my opinion). The structure is like this: Frame My main-window Containe r Content view of main-window Container -based subviews that including the paint(Graphics g) -method I've added all listeners to My main-window and now I'm

Structure of inputs to scipy minimize function

我怕爱的太早我们不能终老 提交于 2019-11-26 15:46:46
问题 I have inherited some code that is trying to minimize a function using scipy.optimize.minimize . I am having trouble understanding some of the inputs to the fun and jac arguments The call to minimize looks something like this: result = minimize(func, jac=jac_func, args=(D_neg, D, C), method = 'TNC' ...other arguments) func looks like the following: def func(G, D_neg, D, C): #do stuff jac_func has the following structure: def jac_func(G, D_neg, D, C): #do stuff What I don't understand is where

How do I put a Java app in the system tray?

梦想与她 提交于 2019-11-26 11:49:24
问题 I have a little control-panel, just a little application that I made. I would like to minimize/put the control-panel up/down with the systemicons, together with battery life, date, networks etc. Anyone that can give me a clue, link to a tutorial or something to read? 回答1: As of Java 6, this is supported in the SystemTray and TrayIcon classes. SystemTray has a pretty extensive example in its Javadocs: TrayIcon trayIcon = null; if (SystemTray.isSupported()) { // get the SystemTray instance

Minimizing all open windows in C#

拥有回忆 提交于 2019-11-26 09:08:46
问题 I saw this C++ code on a forum which minimizes all open windows #define MIN_ALL 419 #define MIN_ALL_UNDO 416 int main(int argc, char* argv[]) { HWND lHwnd = FindWindow(\"Shell_TrayWnd\",NULL); SendMessage(lHwnd,WM_COMMAND,MIN_ALL,0); Sleep(2000); SendMessage(lHwnd,WM_COMMAND,MIN_ALL_UNDO,0); return 0; } How can I access the FindWindow and SendMessage API function and the HWND type in C#.net? 回答1: PInvoke.net is your friend :-) using System; using System.Runtime.InteropServices; namespace

What do you use to minimize and compress JavaScript libraries? [closed]

若如初见. 提交于 2019-11-26 07:19:22
问题 What do you use to minimize and compress JavaScript libraries? 回答1: I use YUI Compressor. Seems to get the job done well! 回答2: I've used YUI Compressor for a long time and have had no problems with it, but have recently started using Google Closure Compiler and had some success with it. My impressions of it so far: It generally outperforms YUI Compressor in terms of file size reduction. By a small amount on simple mode, and by a lot on advanced mode. Simple mode has so far been as reliable as

Painted content invisible while resizing in Java

这一生的挚爱 提交于 2019-11-26 04:56:48
问题 Please note I haven\'t tested this on a Windows-machine only on a Mac-machine. I\'m not so sure whether this also occurs on a Windows-machine... When I resize my Java-application the content is invisible. I already found a way to fix it after resizing it, but not while the user is resizing the window. I\'m not using Swing or something because it makes my binary so slow (in my opinion). The structure is like this: Frame My main-window Containe r Content view of main-window Container -based