i am cutting a big file into blocks, and want to display the rate of the progress. when i click startCut Button, here is the code to execute:
FileInputStream
You've got two problems here:
You should use SwingWorker
or SwingUtilities
to address both of these issues. Basically, you mustn't access the UI from a non-UI thread, and you mustn't do long-running work on a UI thread. See the Swing concurrency tutorial for more information.