Before using the Apple keyboard, there was no quick fullscreen tool on the Windows system, and there was no way to intercept the drop-down menu and click on other places to disappear.
Do not want to write so complex, use Java write a simple call EXE program to achieve delay
1 Importjavax.swing.*;2 Importjava.awt.event.ActionEvent;3 ImportJava.awt.event.ActionListener;4 5 /**6 * Created by YCL on 2017/8/17 2017-8-17 22:33:59.7 */8 Public classCutscreenextendsJFrameImplementsActionListener {9 Ten One JPanel JP; A JLabel jltime; - JComboBox jcbtime; - JButton jbtime; the - PublicCutscreen () { -JP =NewJPanel (); - This. Setcontentpane (JP); + This. Settitle ("Delay"); - This. setvisible (true); +Jp.setlayout (NULL); AJltime =NewJLabel ("Delay Time:"); atJltime.setbounds (25, 15, 100, 30); - Jp.add (jltime); - -string[] str =Newstring[]{"1", "2", "3", "5", "10"}; -Jcbtime =NewJComboBox (str); -Jcbtime.setbounds (110, 15, 100, 30); in Jp.add (jcbtime); -Jbtime =NewJButton ("Start"); toJbtime.addactionlistener ( This); +Jbtime.setbounds (220, 15, 70, 30); - Jp.add (jbtime); the * This. Setdefaultcloseoperation (jframe.exit_on_close); $ This. SetBounds (600, 300, 325, 100);Panax Notoginseng } - the @Override + Public voidactionperformed (ActionEvent e) { A if(E.getsource () = =jbtime) { theString time =Jcbtime.getselecteditem (). toString (); + Try { - This. Setextendedstate (jframe.iconified);//minimized after clicking on the window $Thread.Sleep (Integer.parseint (time) * 1000); $ Openexe (); -System.exit (0);//quit main program after starting EXE program -}Catch(interruptedexception E1) { the e1.printstacktrace (); - }Wuyi } the } - Wu //Execute EXE program, also copy on-line - Public Static voidOpenexe () { About FinalRuntime runtime =runtime.getruntime (); $Process Process =NULL; - - Try { -Process = Runtime.exec ("D:\\software\\tengxunjt.exe"); A +}Catch(FinalException e) { theSystem.out.println ("Error exec!"); - } $ } the the Public Static voidMain (string[] args) { the NewCutscreen (); the } -}
>>>:
Java calls EXE program implementation delay