View Javadoc
1   package com.github.sbugat.rundeckmonitor;
2   
3   import java.awt.BorderLayout;
4   
5   import javax.swing.JButton;
6   import javax.swing.JFrame;
7   import javax.swing.UIManager;
8   import javax.swing.UnsupportedLookAndFeelException;
9   
10  import org.slf4j.ext.XLogger;
11  import org.slf4j.ext.XLoggerFactory;
12  
13  public class RundeckMonitorAboutDialog extends JFrame {
14  
15  	private static final XLogger LOG = XLoggerFactory.getXLogger(RundeckMonitorAboutDialog.class);
16  
17  	private static final long serialVersionUID = 8614361410937565222L;
18  
19  	public RundeckMonitorAboutDialog() {
20  
21  		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
22  
23  		// Try to use the system Look&Feel
24  		try {
25  			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
26  		}
27  		catch (final ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
28  
29  			// If System Look&Feel is not supported, stay with the default one
30  			LOG.warn("Unsupported System Look&Feel", e); //$NON-NLS-1$
31  		}
32  
33  		add(new JButton("OK"), BorderLayout.SOUTH); //$NON-NLS-1$
34  
35  		pack();
36  		setVisible(true);
37  	}
38  
39  	public static void main(final String[] args) {
40  
41  		new RundeckMonitorAboutDialog();
42  	}
43  }