Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kdesp73/swingpaint

A user-friendly library that simplifies coloring and theming, making it easy to integrate into existing desktop applications.
https://github.com/kdesp73/swingpaint

java maven swing swing-components themes theming-components

Last synced: about 2 months ago
JSON representation

A user-friendly library that simplifies coloring and theming, making it easy to integrate into existing desktop applications.

Awesome Lists containing this project

README

        

# SwingPaint

A user-friendly library that simplifies coloring and theming,
making it easy to integrate into existing desktop applications.

## Dependency

[Maven Central](https://central.sonatype.com/artifact/io.github.kdesp73/SwingPaint)

### Maven

```xml

io.github.kdesp73
SwingPaint
1.1.2

```

### Gradle

```text
implementation 'io.github.kdesp73:SwingPaint:1.1.2'
```

## Usage

```java
@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);
}
}

```

### Theme file

File path: `src/main/resources/themes/light.properties`

```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
```

## Contributing

Contributions are always welcome!

See [Contributing.md](https://github.com/KDesp73/Swing-Themes-Library/blob/main/CONTRIBUTING.md) for ways to get started.

Please adhere to this project's [Code of Conduct](https://github.com/KDesp73/Swing-Themes-Library/blob/main/CODE_OF_CONDUCT.md).

## License

[MIT](https://choosealicense.com/licenses/mit/)