The idea behind the program is to see what LookAndFeel’s are available on the system the program is running on. With that also to show examples of how some of the components will look with selected LookAndFeel. I have added a JTextArea where all the names and class names of available LookAndFeel’s are printed that are available on the system.
With some of the components I have added them with some of their methods to see how they are or can be used. I have not used the adapter class for the events.
I have created a Jar file that you can simple run on your system (The Jar file can be downloaded below, just before the source code), the source code will also be available for you to use, change to suit your needs or add more components.
To use the source code:
Java Development Kit (jdk1.8.0_161)
To use the program (jar):
Java Runtime Environment (jre1.8.0_161)
These are the Runtime and Development environments that I used to develop, create, test and run the program.
Compiling the Jar File (Command Prompt):
Step 1: Create Java File
Create the java file. The file can either be created and then copy and paste the code from below source code or download and extract from GithubGist here.
Step 2: Compile Class File
Open the Command prompt in same directory as or change directory to where the Java file has been created/extracted to. Run the below command to create the Class file.
Step 3: Create Jar File
With Command Prompt in the same directory, from Step 2, run the below command to create the Jar file. This command will use the Class file, created in Step 2, to create the Jar file.
|jar cfve LookAndFeel.jar LookAndFeel LookAndFeel.class|
Examples of LookAndFeel available on my system:
LookAndFeel – Metal
LookAndFeel – Nimbus
LookAndFeel – CDE/Motif
LookAndFeel – Windows
LookAndFeel – Windows Classic
Download the Jar File