A user-friendly library that simplifies coloring and theming, making it easy to integrate into existing desktop applications.
<dependency>
<groupId>io.github.kdesp73</groupId>
<artifactId>SwingPaint</artifactId>
<version>1.1.2</version>
</dependency>
implementation 'io.github.kdesp73:SwingPaint:1.1.2'
@PaintAll(label = "label", type = JLabel.class)
@PaintAll(label = "button", type = JButton.class)
public class MainFrame extends JFrame {
private JButton button1;
@Paint(label = "specialbutton")
private JButton button2;
@Paint(label = "myspinner")
private JSpinner spinner1;
private JLabel label1;
private JLabel label2;
private JLabel label3;
MainFrame() {
initComponents();
Theme theme = new Theme("light");
theme.apply(this);
}
}
File path: src/main/resources/themes/light.properties
button.bg = #282828
button.fg = #FFFFFF
specialbutton.bg = #FF00FF
myspinner.bg = #282828
myspinner.fg = #FFFFFF
myspinner.border.color = #000000
myspinner.button.bg = #FF00FF
myspinner.textfield.bg = #92AB01
myspinner.textfield.fg = #FFEEFF
label.fg = #FFDDFF
Contributions are always welcome!
See Contributing.md for ways to get started.
Please adhere to this project's Code of Conduct.