Code Monkey home page Code Monkey logo

pgslookandfeel's Introduction

About

The PgsLookAndFeel is a modern, cross platform LookAndFeel for Java/Swing.

It’s goal is to provide a single look and feel for applications on Windows, Gnome and KDE. It is free and OpenSource, licensed under terms of the Apache Software License 2.

Usage

You may choose the "everyday" version of setting a PLAF:

try {
	UIManager.setLookAndFeel("com.pagosoft.plaf.PgsLookAndFeel");
	// Is your UI already created? So you will have to update the component-tree
	// of your current frame (or actually all of them...)
	SwingUtilities.updateComponentTreeUI(yourFrame);
} catch(Exception e) { /* Most of the time you're just going to ignore it */ }

As an alternative both PlafOptions and PgsLookAndFeel provide static methods to do both of it:

PlafOptions.setAsLookAndFeel();
PlafOptions.updateAllUIs();

Why is this better?

  • You don't have to think of exception-handling that you're going to ignore anyway.
  • You don't have to update all frames, because the updateAllUIs-method does this by itself!

Please notice: It does not matter on what of the two classes you call the two methods. PlafOptions calls the right methods on the PgsLookAndFeel (same goes for setCurrentTheme).

You may ask why I've integrated them into PlafOptions, right? Well, it's because I wanted to have every configuration/option to be inside of it, so you have only to work with one class.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.