How to make canvas with Swing?
问题 I\'m trying to make a paint editor with Java in which I have a toolbar with the objects that I would like to paste in the canvas. I\'m using Swing components to make the GUI, but when I looked for the way of making the canvas, I only found the class canvas from AWT. Is there any way to make something similar to canvas with Swing? (for example, JPanel?) I have read that using the class canvas from AWT with a GUI made with swing won\'t work correctly, is that true? 回答1: In order to make a