Java Swing: GUI is not updating some properties

前端 未结 2 2051
我寻月下人不归
我寻月下人不归 2021-01-22 18:52

EDIT: A EASIEST, SIMPLE AND CHECKABLE PROBLEM BELOW

RESUME

I\'m doing a Latin Square application, which, sets a square of size

2条回答
  •  轮回少年
    2021-01-22 19:12

    Need another Thread for fix it.

    Changing the listener class, works fine:

     class ResolveListener implements ActionListener
        {
            @Override
            public void actionPerformed(ActionEvent e)
            {
                new Thread(new Runnable()
                {
                    @Override
                    public void run()
                    {
                        try {
                            TestContainerButtonJPanel.this.testJPanel.colourCells();
                        } catch (InterruptedException e1) {
                            e1.printStackTrace();
                        }
                    }
                }).start();
            }
    
    
        }
    }
    

提交回复
热议问题