I've already read the post Java / Swing how to deal with different screen DPI and density settings?, regarding the jLabel images pixelization on new JDKs (above 9) and high DPI screens, but it didn't do the trick.
Here is my case and code: My old projects using png images worked fine (no pixelization) on old DPI screens, but now, all images are pixelized. So, I'm burning out my brain here to solve this issue and created a new Java project using a high-resolution PNG image.
The Problem: Doesn't matter how hard I try, the image is not getting resized to the jLabel size. Here is the code:
initComponents(); //Initialize the JFrame components...
ImageIcon iconWorkHours = new ImageIcon(getClass().getResource("/horkhours/WorkHours.png"));
this.lblLogo.setPreferredSize(new Dimension(135, 133));
Image imageWorkHours = iconWorkHours.getImage();
imageWorkHours.getScaledInstance(lblLogo.getWidth(), lblLogo.getHeight(), Image.SCALE_SMOOTH);
BufferedImage bufImgWH = new BufferedImage(lblLogo.getWidth(), lblLogo.getHeight(), BufferedImage.TYPE_INT_ARGB);
bufImgWH.getGraphics().drawImage(imageWorkHours, 0, 0, null);
this.lblLogo.setIcon(new ImageIcon(bufImgWH));