How can I create a more user-friendly graphical interface that is not pixel and old?

I am trying to find a better interface or a better way to draw things in Java, basic things like strings, lines and shapes, they all turn out to be very pixelated and old, like id, to improve this.

The more it is associated with an existing java package, the better.

+4
source share
2 answers

Take a look at Java 2D . You can set the drawing to a higher quality using the setRenderingHints function. (If you turn on anti-aliasing, you won't see such jagged lines on your artwork.)

From a related article:

public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.setRenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.ANTIALIAS_ON); // draw shapes... } 
+7
source

If you want to stay in the java domain, maybe you should try Java FX ? I know it is not pure java, but its pretty close ...

-2
source

Source: https://habr.com/ru/post/1394465/


All Articles