I want to add a Pie chart inside a JPanel. I have gone through this and this. But it didnt helped me. I tried this code in the debugger but it is not getting pass line X. Somehow setScene function is not working and pie chart is not visible in the panel. Here’s my code: I am not sure why