How to take screenshot and attach into new email message in Java w/ Netbeans

I'm currently using an ActionListener to create a new email with the user's default email client. I'd like to have the function take a screenshot and attach that or embed that into the email. Here's what I'm doing right now

EmailItem.addActionListener(new ActionListener() {

@Override

public void actionPerformed(ActionEvent ae) {

try {

URI uriMailTo = new URI("mailto:help@example.com?subject=New%20Support%20Request&body=Issue%20Details:%0D%0A%0D%0AUsers%20Affected:%0D%0A%0D%0APlease%20attach%20a%20screenshot%20if%20possible.");

Desktop desktop;

desktop = Desktop.getDesktop();

desktop.mail(uriMailTo);

} catch (Exception e) {}

}

});...

Read More »

By: StackOverFlow - Wednesday, 14 March

Related Posts