You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

birosys

Trainee

  • "birosys" is male
  • "birosys" started this thread

Posts: 48

Date of registration: Feb 9th 2009

Location: Mladenovac, Serbia

Occupation: Programming

Hobbies: Programming

  • Send private message

1

Friday, September 11th 2009, 12:17am

Substance skins with Jabaco

Hello
With Substance skin engine, you can create very professional look of your application.

1.Download engine from https://substance.dev.java.net/ (download Substance 5.2 library)
2.Add to your CLASSPATH (F1 in Jabaco)
3.Add reference for UIManager and SwingUtilities
4.Add this code to Form_Load

Jabaco Source

1
2
UIManager.setLookAndFeel ("org.jvnet.substance.skin.SubstanceMistAquaLookAndFeel")
   SwingUtilities.updateComponentTreeUI(Me)


That is all :)

Screenshots of skins can be found on https://substance.dev.java.net/learn.html

PS: Screenshot from Jabaco
birosys has attached the following image:
  • skin.PNG

hari

Beginner

  • "hari" is male

Posts: 8

Date of registration: May 9th 2009

About me: Web developer by trade, and lover of Open Source Movement!

Location: Coimbatore,TamilNadu,India

Occupation: Web Developer

Hobbies: programming,bycycling,chess,drawing

  • Send private message

2

Friday, September 11th 2009, 12:26am

cool man

it really looks cool

klctal

Trainee

  • "klctal" is male

Posts: 70

Date of registration: Jul 13th 2009

Location: Shanghai

Hobbies: Developing software

  • Send private message

3

Friday, September 11th 2009, 8:43am

Cool it would be good for my apps! :thumbsup:
:D

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

4

Friday, September 11th 2009, 4:04pm

Hi,
I tried to call the recommended methods in Form_Load and got the following error:

Quoted


org.jvnet.substance.api.UiThreadingViolationException: Component creation must be done on Event Dispatch Thread
at org.jvnet.substance.utils.SubstanceCoreUtilities.testComponentCreationThreadingViolation(SubstanceCoreUtilities.java:2368 )


To circumvent this problem, I created an asynchronous thread, but this hasn't helped either.

Google returns quite a few similar stories about Substance.
Any ideas how to move these calls into the "Event Dispatch Thread"?

A1880

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

5

Friday, September 11th 2009, 4:19pm

The trick works with small example but not for my form which happens to have some 20 controls and usercontrols.
It might be a matter of timing ....

A1880

birosys

Trainee

  • "birosys" is male
  • "birosys" started this thread

Posts: 48

Date of registration: Feb 9th 2009

Location: Mladenovac, Serbia

Occupation: Programming

Hobbies: Programming

  • Send private message

6

Friday, September 11th 2009, 10:13pm

I tried with 20 or more controls, it partialy work.
ComboBox and RadioBox dont working

new screenshot
birosys has attached the following image:
  • testUI.PNG

klctal

Trainee

  • "klctal" is male

Posts: 70

Date of registration: Jul 13th 2009

Location: Shanghai

Hobbies: Developing software

  • Send private message

7

Saturday, September 12th 2009, 4:27am

:D

klctal

Trainee

  • "klctal" is male

Posts: 70

Date of registration: Jul 13th 2009

Location: Shanghai

Hobbies: Developing software

  • Send private message

8

Wednesday, September 16th 2009, 9:34am

I got the same thing: 20 + controls and it doesn't work, the refresh also doesn't work.
With 20+ you refresh it or drag something on it, it works. If it can refresh, it would be good.

also, the 20 + controls might be 20 + same controls or usercontrols
:D

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

9

Wednesday, September 16th 2009, 8:14pm

Alternativly you can create your program normally and start it then with

Source code

1
java -Dswing.systemlaf=org.jvnet.substance.skin.SubstanceMistAquaLookAndFeel -jar YourProgram.jar


But be sure, that you have copied before the Sunstance jar file in your JRE-ext directory.
I think its under C:\Program Files\Java\jre6\lib\ext
Otherwise Java can not find it. Then it helps also not to set it in the Classpath, because the "-D" flag have a higher priority.

Edit:
Some additional note:

That is, what I very often do, changing the LaF in this way.
For normal programs, which starts with the MetalLookAndFeel (which is the default Look And Feel) you can start it with

Source code

1
java -Dswing.defaultlaf=com.sun.java.swing.plaf.motif.MotifLookAndFeel -jar YourProgram.jar

or if you want that LookAndFeel for all that programs, you can create in
C:\Program Files\Java\jre6\lib
the file "swing.propertied" and write in there
swing.defaultlaf=com.sun.java.swing.plaf.motif.MotifLookAndFeel
Additional possibilities for the file "swing.properties" you can find at
http://weblogs.java.net/blog/kirillcool/…o_use_undo.html

And if your Java program uses the System-LAF you can change it with

Source code

1
java -Dswing.systemlaf=com.sun.java.swing.plaf.motif.MotifLookAndFeel -jar YourProgram.jar


Instead the MotifLookAndFeel you can choose the NimbusLookAndFeel or any other.

This post has been edited 3 times, last edit by "theuserbl" (Sep 16th 2009, 8:26pm)


Rate this thread
WoltLab Burning Board