Skip to content

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

License

Notifications You must be signed in to change notification settings

KDesp73/SwingPaint

Repository files navigation

SwingPaint

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

Dependency

Maven Central

Maven

<dependency>
    <groupId>io.github.kdesp73</groupId>
    <artifactId>SwingPaint</artifactId>
    <version>1.1.2</version>
</dependency>

Gradle

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

Usage

@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

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 for ways to get started.

Please adhere to this project's Code of Conduct.

License

MIT

About

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

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages