List of usage examples for javax.swing UnsupportedLookAndFeelException printStackTrace
public void printStackTrace()
From source file:misc.TrayIconDemo.java
public static void main(String[] args) { /* Use an appropriate Look and Feel */ try {/*from w ww.j a v a 2s . com*/ UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } catch (IllegalAccessException ex) { ex.printStackTrace(); } catch (InstantiationException ex) { ex.printStackTrace(); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } /* Turn off metal's use of bold fonts */ UIManager.put("swing.boldMetal", Boolean.FALSE); //Schedule a job for the event-dispatching thread: //adding TrayIcon. SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); }
From source file:FocusEventDemo.java
public static void main(String[] args) { /* Use an appropriate Look and Feel */ try {//from w ww . j a v a2s. c om // UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } catch (IllegalAccessException ex) { ex.printStackTrace(); } catch (InstantiationException ex) { ex.printStackTrace(); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } /* Turn off metal's use of bold fonts */ UIManager.put("swing.boldMetal", Boolean.FALSE); // Schedule a job for the event dispatch thread: // creating and showing this application's GUI. javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); }
From source file:FocusTraversalDemo.java
public static void main(String[] args) { /* Use an appropriate Look and Feel */ try {/*ww w. ja va2 s. c om*/ // UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); // UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } catch (IllegalAccessException ex) { ex.printStackTrace(); } catch (InstantiationException ex) { ex.printStackTrace(); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } /* Turn off metal's use of bold fonts */ UIManager.put("swing.boldMetal", Boolean.FALSE); // Schedule a job for the event-dispatching thread: // creating and showing this application's GUI. javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); }
From source file:events.KeyEventDemo.java
public static void main(String[] args) { /* Use an appropriate Look and Feel */ try {/*from w w w.ja v a 2s. c om*/ //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); //UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } catch (IllegalAccessException ex) { ex.printStackTrace(); } catch (InstantiationException ex) { ex.printStackTrace(); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } /* Turn off metal's use of bold fonts */ UIManager.put("swing.boldMetal", Boolean.FALSE); //Schedule a job for event dispatch thread: //creating and showing this application's GUI. javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); }
From source file:WindowEventDemo.java
public static void main(String[] args) { /* Use an appropriate Look and Feel */ try {//from w ww . j a va 2 s . c o m // UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); // UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } catch (IllegalAccessException ex) { ex.printStackTrace(); } catch (InstantiationException ex) { ex.printStackTrace(); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } /* Turn off metal's use of bold fonts */ UIManager.put("swing.boldMetal", Boolean.FALSE); // Schedule a job for the event dispatch thread: // creating and showing this application's GUI. javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); }
From source file:misc.ModalityDemo.java
public static void main(String[] args) { /* Use an appropriate Look and Feel */ try {//from w w w .j av a 2 s. c o m //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } catch (IllegalAccessException ex) { ex.printStackTrace(); } catch (InstantiationException ex) { ex.printStackTrace(); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } /* Turn off metal's use of bold fonts */ UIManager.put("swing.boldMetal", Boolean.FALSE); //Schedule a job for the event-dispatching thread: //creating and showing this application's GUI. SwingUtilities.invokeLater(new Runnable() { public void run() { ModalityDemo md = new ModalityDemo(); md.createAndShowGUI(); md.start(); } }); }
From source file:misc.DesktopDemo.java
public static void main(String args[]) { /* Use an appropriate Look and Feel */ try {//from w w w .j a v a2s . co m //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); //UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } catch (IllegalAccessException ex) { ex.printStackTrace(); } catch (InstantiationException ex) { ex.printStackTrace(); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } /* Turn off metal's use of bold fonts */ UIManager.put("swing.boldMetal", Boolean.FALSE); //Schedule a job for the event-dispatching thread: //creating and showing this application's GUI. SwingUtilities.invokeLater(new Runnable() { public void run() { new DesktopDemo().setVisible(true); } }); }
From source file:edu.ku.brc.specify.toycode.mexconabio.FileMakerToMySQL.java
/** * @param args//from www . j a v a 2 s . co m */ public static void main(String[] args) { if (!System.getProperty("os.name").equals("Mac OS X")) { try { UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); } catch (UnsupportedLookAndFeelException e) { e.printStackTrace(); } PlasticLookAndFeel.setPlasticTheme(new DesertBlue()); } SwingUtilities.invokeLater(new Runnable() { @Override public void run() { //FileDialog dlg = new FileDialog((Frame)null, "Choose a FileMaker XML File"); //dlg.setVisible(true); String fileName = "xxx.xml";//dlg.getFile(); if (StringUtils.isNotEmpty(fileName)) { //String path = dlg.getDirectory() + File.separator + fileName; //String name = "AgentsBryo_Vasc"; String tableName = "Conabio"; //String name = "TaxonomicBryo_Vasc"; boolean addKey = true; FileMakerToMySQL fm2mysql = new FileMakerToMySQL(tableName, null, addKey); //fm2mysql.cleanFile("/Users/rods/Documents/"+name+".xml"); fm2mysql.process(true); fm2mysql.process(false); fm2mysql.shutdown(); } else { System.exit(0); } } }); }
From source file:Main.java
public static void setLookAndFeel(LookAndFeel laf, JFrame frame) { try {/*ww w .j av a2s . c o m*/ UIManager.setLookAndFeel(laf); if (frame != null) { SwingUtilities.updateComponentTreeUI(frame); frame.pack(); } } catch (UnsupportedLookAndFeelException e) { System.err.println("This Look and Feel is not supported!"); e.printStackTrace(); } }
From source file:de.cenote.jasperstarter.Report.java
public static void setLookAndFeel() { try {//from w w w . j a va 2 s . c o m // Set System L&F UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (UnsupportedLookAndFeelException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } }