Drawing rectangles using clip and lines can lead that some borders are not drawn for floating point UI scale. See the attached screenshot:
----------------
g.scale(1.5, 1.5);
g.setColor(Color.ORANGE);
drawRect(g, 7, 5, 25, 20);
drawRect(g, 35, 5, 24, 21);
private static void drawRect(Graphics2D g, int x, int y, int w, int h) {
g.setClip(x, y, w, h);
g.drawLine(x, y, x + w, y);
g.drawLine(x, y + h, x + w, y + h);
g.drawLine(x, y, x, y + h);
g.drawLine(x + w, y, x + w, y + h);
}
----------------
The JInternalFrame borders should be drawn by rectangles.