FakeVirus_Pop-Up This is fake virus pop up java swing program. If you want to block the close option, just change this particular line in Frame class. this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); Screenshot :