LookAndFeel suggestion


I think it would be really handy if the base LookAndFeel class had an applicationBackground Colour member.

That’s the first thing i added to my own custom LookAndFeel class, so that i can keep all ‘settings’ separate from the code, but it means that i have to cast the getDefaultLookAndFeel result, which makes allowing for alternative LookAndFeels slightly more work. Of course, I could just set the main app window to use a specific LookAndFeel, but for just the background colour that’s a little pointless. One of the things i’m going to be putting in my tutorial in a later chapter is use of the LookAndFeel class, and the most obvious thing to demonstrate is using your own to change the background colour without editing the program code.

Is this a reasonable suggestion?


well it’s a slippery slope when you start adding specific things like that… A better idea might be to let the lookandfeel object keep a list of named colours, so your app could retrieve the one it needs by name?


i think i may be misunderstanding you, but that’s what i mean. like it already has alertWindowBackground, and things like that. applicationBackground is a fairly generally applicable colour to want defined (i know i have my favourite blue i use every time :hihi:)