Upload
onaona
View
21
Download
1
Tags:
Embed Size (px)
DESCRIPTION
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 "); - PowerPoint PPT Presentation
Citation preview
User interface
Widget toolkits
• AWT• Swing• JavaFX• SWT (Eclipse)• ...
AWT and Swing
Look&Feel
• CrossPlatformLookAndFeel• SystemLookAndFeel (Windows, Motif/GTK)• Synth (Nimbus)
Look&Feeltry { UIManager.setLookAndFeel( "javax.swing.plaf.metal.MetalLookAndFeel");// UIManager.setLookAndFeel(//
UIManager.getSystemLookAndFeelClassName());// SwingUtilities.updateComponentTreeUI(this); } catch (Exception e){ //Exception handle}
JTable Demo Metal
JTable Demo Nimbus
JTable Demo Windows
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); }}
AWT Layout managers
Swing Layout managers
Q&A