html5-img
1 / 12

User interface

User interface. Widget toolkits. AWT Swing JavaFX SWT (Eclipse). AWT and Swing. Look&Feel. CrossPlatformLookAndFeel SystemLookAndFeel ( Windows, Motif/GTK ) Synth (Nimbus). Look&Feel. try { UIManager.setLookAndFeel ( " javax.swing.plaf.metal.MetalLookAndFeel ");

onaona
Download Presentation

User interface

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. User interface

  2. Widget toolkits • AWT • Swing • JavaFX • SWT (Eclipse) • ...

  3. AWT and Swing

  4. Look&Feel • CrossPlatformLookAndFeel • SystemLookAndFeel (Windows, Motif/GTK) • Synth (Nimbus)

  5. Look&Feel try { UIManager.setLookAndFeel( "javax.swing.plaf.metal.MetalLookAndFeel"); // UIManager.setLookAndFeel( // UIManager.getSystemLookAndFeelClassName()); // SwingUtilities.updateComponentTreeUI(this); } catch (Exception e){ //Exception handle }

  6. JTable Demo Metal

  7. JTable Demo Nimbus

  8. JTable Demo Windows

  9. Hello, World! import javax.swing.*; public final class HelloWorld implements Runnable { public static void main(String[] args) { SwingUtilities.invokeLater(new HelloWorld()); } public void run() { JFrame f = new JFrame("Hello, World!"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.add(new JLabel("Hello World")); f.pack(); f.setVisible(true); } }

  10. AWT Layout managers

  11. Swing Layout managers

  12. Q&A

More Related