Statystyki: autor: mszubart — 29 kwie 2011, 13:58
Statystyki: autor: Dario84 — 28 kwie 2011, 23:01
Hhmm co to znaczy ze Metal nie działa?
Statystyki: autor: mszubart — 28 kwie 2011, 22:40
Statystyki: autor: Dario84 — 28 kwie 2011, 21:41
Metal to nie jest windowsowy tylko wlasnie uniwersalny, o ktorym mowilem wyzej.co ciekawe com.sun.java.swing.plaf.metal.MetalLookAndFeel nie działa, a ten windowsowy to Metal (dziwne)
How the UI Manager Chooses the Look and Feel
Here are the look-and-feel determination steps that occur when the UI manager needs to set a L&F:
1. If the program sets the L&F before a look and feel is needed, the UI manager tries to create an instance of the specified look-and-feel class. If successful, all components use that L&F.
2. If the program hasn't successfully specified a L&F, then the UI manager uses the L&F specified by the swing.defaultlaf property. If the property is specified in both the swing.properties file and on the command line, the command-line definition takes precedence.
3. If none of these steps has resulted in a valid L&F, Sun's JRE uses the Java L&F. Other vendors, such as Apple, will use their default L&F.
Statystyki: autor: mszubart — 28 kwie 2011, 21:38
Specifying the Look and Feel: Command Line
You can specify the L&F at the command line by using the -D flag to set the swing.defaultlaf property. For example:
java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel MyApp
java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel MyApp
Specifying the Look and Feel: swing.properties File
Yet another way to specify the current L&F is to use the swing.properties file to set the swing.defaultlaf property. This file, which you may need to create, is located in the lib directory of Sun's Java release (other vendors of Java may use a different location). For example, if you're using the Java interpreter in javaHomeDirectory\bin, then the swing.properties file (if it exists) is in javaHomeDirectory\lib. Here is an example of the contents of a swing.properties file:
# Swing properties
swing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Statystyki: autor: Dario84 — 28 kwie 2011, 21:31
Kod:
/opt/netbeans-7.0/bin/netbeans --laf com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Statystyki: autor: mszubart — 28 kwie 2011, 20:43
Kod:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
Statystyki: autor: Dario84 — 28 kwie 2011, 19:57
Statystyki: autor: mszubart — 28 kwie 2011, 19:49
Statystyki: autor: Dario84 — 28 kwie 2011, 18:08
Statystyki: autor: mszubart — 28 kwie 2011, 17:44
Statystyki: autor: mszubart — 26 kwie 2011, 21:33
Statystyki: autor: Dwimenor — 26 kwie 2011, 21:26
Statystyki: autor: mszubart — 26 kwie 2011, 20:41