`if(!Taskbar.isTaskbarSupported()) {
JOptionPane.showMessageDialog(null, "Taskbar isn't supported!","ERROR", JOptionPane.ERROR_MESSAGE);
System.exit(-1);
}
JFrame jf = new JFrame("Taskbar");
jf.setSize(500, 250);
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jf.setVisible(true);
Taskbar.getTaskbar().setIconImage();`
Even I imported still it gives me error on Taskbar. So I'm not able to use Taskbar. I want to display default icon on Taskbar but it's not working.