Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / May 2004

Tip: Looking for answers? Try searching our database.

Default Window's Fonts.

Thread view: 
Jeff Douglass - 08 May 2004 17:46 GMT
What font should menu items be so that they follow the standard Windows
settings that can be changed from Appearance tab in the Display Properties
window. In standard MS apps, and most other apps, the fonts used for menus
and other areas such as window title bars are linked to the system setings
that can be changed from the Appearance tab in the Display Properties
window. Therefore you can change the appearance of all your apps from
Windows Display Properties window accesable from the Desktop.

Thanks in advance.

Jeff
Mark Thornton - 08 May 2004 18:06 GMT
> What font should menu items be so that they follow the standard Windows
> settings that can be changed from Appearance tab in the Display Properties
[quoted text clipped - 7 lines]
>
> Jeff

Are you using Swing with the Windows L&F? Have you looked at the L&F
updates on the java.net site?

Mark Thornton
Jeff Douglass - 08 May 2004 18:09 GMT
I am using Netbeans as the IDE and all components are Swing. In the apps
main class I use the statement
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); to set
the look and feel for the whole app, at least that is what I think is going
on. I am new to java and Netbeans and from what I could figure out is that
the above statement will set the app to use the windows look and feel when
it is running on a windows maching and others when running on different
machines. I do not do any other look and feel operations any where else in
the app. Is this wrong? I know it can be done because Netbeans itself
implement the behavior that I want.

Thanks again

Jeff
Mark Thornton - 08 May 2004 18:31 GMT
> I am using Netbeans as the IDE and all components are Swing. In the apps
> main class I use the statement
[quoted text clipped - 10 lines]
>
> Jeff

That is the right way to start. You should have a look here:

https://winlaf.dev.java.net/
Andrew Thompson - 08 May 2004 18:45 GMT
>> I am using Netbeans as the IDE and all components are Swing. In the apps
>> main class I use the statement
>> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

There are some tricks to setting the L&F.

If you set it after the the components
are created/shown, you need to chase the
changes down through the UI.  

Here is an example of doing just that.
<http://www.physci.org/launcher.jsp#JPLAFChanger>

Signature

Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology

Jeff Douglass - 08 May 2004 19:09 GMT
I am setting the L&F as recommended by sun buy

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

This statement is the frist thing called in the main function and no other
objects are created prior to this statements so I would assume that this is
correct. The app definately is using the Windows L&F.  What I don't
understand is why my apps menu fonts, and other things, are not using the
windows desktops setting but the Netbeans IDE is. I would assume that both
are using all the same stuff like L&F, SDK, JRE. Any ideas on what I should
look at?

Thanks again

jeff
Andrew Thompson - 08 May 2004 20:29 GMT
> .. What I don't
> understand is why my apps menu fonts, and other things, are not using the
> windows desktops setting but the Netbeans IDE is. I would assume that both
> are using all the same stuff like L&F, SDK, JRE. Any ideas on what I should
> look at?

You might find the JGoodies Windows PLAF
to be closer to what you expect to see.  
Check it out at.. <http://www.jgoodies.com>

Signature

Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.