Call new ClipboardView class & set Windows Look and Feel

osx
Hammy 3 years ago
parent 4b3d7cfcc8
commit 20d7f48883

@ -2,26 +2,17 @@ package me.goudham;
import me.goudham.view.ClipboardView; import me.goudham.view.ClipboardView;
import javax.swing.JFrame; import javax.swing.SwingUtilities;
import java.awt.Color; import javax.swing.UIManager;
import java.awt.Dimension; import javax.swing.UnsupportedLookAndFeelException;
/** /**
* Hello world! * Hello world!
* *
*/ */
public class Main { public class Main {
public static void main( String[] args ) { public static void main(String[] args) throws UnsupportedLookAndFeelException, ClassNotFoundException, InstantiationException, IllegalAccessException {
JFrame jFrame = new JFrame(); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
jFrame.setTitle("My Clipboard History"); SwingUtilities.invokeLater(() -> new ClipboardView().createAndShowGUI());
jFrame.setVisible(true);
jFrame.setContentPane(new ClipboardView().getClipboard());
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.getContentPane().setBackground(new Color(1, 3, 25));
jFrame.setPreferredSize(new Dimension(1000, 680));
jFrame.setMaximumSize(new Dimension(1000, 680));
jFrame.setResizable(false);
jFrame.pack();
jFrame.setLocationRelativeTo(null);
} }
} }

Loading…
Cancel
Save