Is it Bad Practice to use HTML Styling in Java Swing Elements?

后端 未结 2 1334
傲寒
傲寒 2021-02-13 06:24

It is considered bad practice to style Swing elements using HTML?

As an example, if I want to make a label bigger and red just once, I have two options:

Either u

2条回答
  •  粉色の甜心
    2021-02-13 06:49

    Using is bad even in html. And using objects to customize font color, size etc is lot of work in big applications.

    Fortunately, javaFX 2 is out. With it you can use CSS to deal with these kinds of things : http://www.oracle.com/technetwork/java/javafx/documentation/index.html

提交回复
热议问题