Skip to main content

Handling defaultclose

User can handle defaultclose operation with 4 options as following  :

  1. HIDE :Hide hides the JFrame but do not pause the task of that window .Ex . If a JFrame plays a video , after clicking on hide button only the frame can be hidden. User can make the frame visible.It  does not need to write any code.

  2. EXIT :
    It exits the frame. EXIT_ON_CLOSE abruptly terminates all the threads of the JFrame. And frees the object of that frame.
    [box type="shadow" ]setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);[/box]

  3. DO_NOTHING :
    As the name suggests DO_NOTHING frame does nothing with the frame. All the tasks continues after clicking on the close button.No changes are made in the JFrame.
    [box type="shadow" ]setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);[/box]

  4. DISPOSE :
    DISPOSE on close is works same as HIDE with a thin difference line.It hides JFrame but the tasks of JFrames are performed in the background.The difference between HIDE and DISPOSE is the disposed JFrame can not be make visible.
    [box type="shadow" ]setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);[/box]

Comments

Popular posts from this blog

Facebook Login In PHP

As we all know Time is Money. When there's a long form on your site for registration you could sometimes lose your visitors. To make this registration step a success, adding a small social login button to your site may cut down lot of burden on visitors side and will help you in getting more attention on your data rather than wasting time on the lengthy registration process. By doing so visitor will be glad to see that you care for their precious time.   What do you think will there be anyone in this small world who is not having a Facebook account? According to recent stats 1 in every 13 person in this world is using facebook.

USB Boot Procedure

Simple step-by-step solution to create a bootable usb in cmd: 1)   Take a pen drive of more than 4gb . 2)   Now the most important step is to open cmd from start->search program and files->type cmd . 3)   Now in the new window, type diskpart and hit enter. 4)   Type the command list disk . Now, note the disk which have size identical to that of your pen drive. eg. disk 1. 5)   Type the command select disk 1 . 6)   Then type clean and hit enter. 7)   Just type create partition primary and press enter. 8)  Then run the command list partition . 9)  Type select partition 1 and hit enter. 10) Format it using the command format fs=ntfs . 11) Type the commands active , assign and exit in sequence. Now just copy all the files from Boot-able disc of  windows 7 to the pen drive and your pen drive is ready to be used as a boot-able device.