• Post Reply Bookmark Topic Watch Topic
  • New Topic

Color schemes chosen by user

 
Nigel Hoath
Greenhorn
Posts: 19
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all. I'm working on a standalone GUI under Windows using JAVA SWT and eclipse. I have a colour scheme based on six colours inplemented as:



I have 8 sets of six colours prepared. I'd like to let the user choose a colour scheme and even change it while they use the application.

As can be seen the Color s are with final as if they are not the code below gives an error.



Could anyone suggest a good approach, point me at a tutorial, give any hints as to how best to go about this? Many thanks in anticipation.

 
Campbell Ritchie
Marshal
Posts: 52519
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know whether this tutorial will help, but try it.

Moving to our GUIs forum.
 
Nigel Hoath
Greenhorn
Posts: 19
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Don't know whether this tutorial will help, but try it.

Moving to our GUIs forum.


Tx for that. It was interesting but more looking for a standard approach. I guess stuffing the preferences file with the executable would make it available. Then I need to read it and store it in variables while the splash screen is displayed.

But how can I store it so it isn't final and gives the errors as above?

I'm going to try creating a class and see if that gets me more success. Bit surprised I can't find a tutorial/example of this as it must be a common requirement and there must be elegant but easy maintainable approaches that do not require additions (extra libraries or whatever).

But all great fun although I'm getting closer to various project milestones - If I'm not careful I'll not be finished with a usable solution and will have to rely on the final step in the project plan.

Final step: One day elapsed, no resource, no budget. A miracle occurs, it goes live. Hooray
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!