permaculture playing cards*
The moose likes Swing / AWT / SWT and the fly likes HFJ (1rst ed) and java 5: look and feel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "HFJ (1rst ed) and java 5: look and feel" Watch "HFJ (1rst ed) and java 5: look and feel" New topic
Author

HFJ (1rst ed) and java 5: look and feel

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
in HFJ i read this: (pag 338)

(...) If you want to be safe, you can either explicitly set the look and feel to Metal, so that you know exactly what you get regardless of where the app is running, or dont specify a look and feel and accept the defaults.


Is it still the same with java 5?

because i got the impression defaults (with java 5) set the OS look and feel(i've winXP), while if compiled with 1.4 i get something very diferent

TiA


java amateur
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

The default Java 5 look and feel is Ocean on any platform.


GenRocket - Experts at Building Test Data
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
thanks for your answer

one last Q:
and default L&F for 1.4 is metal?

TiA

edit:
i got it:

C:\javas\HFJ>java SimpleGui1B
[The Java(tm) Look and Feel - javax.swing.plaf.metal.MetalLookAndFeel]


[ April 15, 2005: Message edited by: miguel lisboa ]

edited again:
but with 5 says metal too:
C:\javas\HFJ>java -version
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode)

C:\javas\HFJ>java SimpleGui1B
[The Java(tm) Look and Feel - javax.swing.plaf.metal.MetalLookAndFeel]
[ April 15, 2005: Message edited by: miguel lisboa ]
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
what i'm trying to state is that, no mather which compiler i use (1.4 or 5) msg says look and feel is metal, though they look diferent
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFJ (1rst ed) and java 5: look and feel