Create JInternalFrames and save the one which is s

2019-03-03 17:29发布

I am learning Java now and I was wondering how to create JInternalFrames in a JFrame and save them as files. I draw some objects on the internal frames and I have a button 'Save'. For example, there are several of the internal frames and I want to save the one which is selected. May someone provide me with simple code on how to do this? Only the frames and how to save them.

1条回答
三岁会撩人
2楼-- · 2019-03-03 18:07
  1. Read the JDesktopPane API. You will find a method that will get you the currenctly selected internal frame.

  2. Check out Screen Image. This will allow you to create an image of any Swing component. It will also allow you to save this image to a file.

查看更多
登录 后发表回答