My GUI is frozen

后端 未结 6 1737
青春惊慌失措
青春惊慌失措 2020-12-11 13:45

I have something I can\'t understand: my Swing GUI contains a \'play\' and \'pause\' button. I have also a static variable that defines \'ON\' and \'OFF\' states. (The main

6条回答
  •  温柔的废话
    2020-12-11 14:10

    @Override
    public void actionPerformed(ActionEvent e) {
         new Thread() {
            public void run() {
                //your code which runs on click event
            }
        }.start();
    
    }
    

提交回复
热议问题