Because I cannot see small letters I set windows display to 150%. All things on my monitor are resized without losing quality. But unfortunately, it doesn't happen with Java Swing interface. Indeed, the Swing interface is scaled, but it has a wrong quality.
Can somebody help me to solve it?
Depending on what exactly you mean by "quality", but you can set rendering hints with several options, eg anti-aliasing:
public void paint (graphics g){
Graphics2D g2 = (Graphics2D)g;
RenderingHints rh = new RenderingHints(
RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g2.setRenderingHints(rh);
...
}
There are several of these hints, you can find a list here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.