I want to scale and resize with mouse selected image, change selected image with corner point, and change scale picture in JTextPane as in Microsoft Word. This code just added image without change size in text editor but not have function propertes size picture. Please somebody help me with code:
JFileChooser jf=new JFileChooser();
// Show open dialog
int option=jf.showOpenDialog(this);
// If user chooses to insert..
if(option == JFileChooser.APPROVE_OPTION) {
File file = jf.getSelectedFile();
if(isImage(file)) {
jTextPane1.insertIcon(new ImageIcon(file.getAbsolutePath()));
}else
// Show an error message, if not an image
JOptionPane.showMessageDialog(this,"The file is not an image.",
"Not Image", JOptionPane.ERROR_MESSAGE);
}