jQuery in Action, 3rd edition
The moose likes Swing / AWT / SWT and the fly likes Using synth only for certain components? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Using synth only for certain components?" Watch "Using synth only for certain components?" New topic

Using synth only for certain components?

Dennis Korbar

Joined: Jan 14, 2009
Posts: 20

is there any way to use synth just for certain components so that it doesn't blank out every component that isn't specified in the xml file?
And if there isn't, is there another way of creating JButtons that use images depending on their current state (pressed or released)?
Furthermore, are there any good synth articles / online resources? I read through the articles provided by SUN, but those only scratch the surface and I haven't been able to find any detailed tutorials or guides.

I'm not really sure if I'm approaching my problem the right way, I got a graphical Swing UI and a Design for it as an image, and I have to implement the design into the Swing gui. Is there something like a best practice way of doing something like this?

Any help appreciated!


Edit: I should probably add that I have to do this in Java 1.5!
Wendy Gibbons

Joined: Oct 21, 2008
Posts: 1107

I am only at the start of the book "filthy rich clients", but from what i have read so far overriding the paint method is the way to go.

As for synth our company tried it and dumped it, i do not know if it was just our implementation but it didn't cope with changing window size very well.
Dennis Korbar

Joined: Jan 14, 2009
Posts: 20
Hehe, fitting title
Synth is working fine so far, I just don't want to go through all the trouble of declaring styles for each and every component while I just want to change some buttons
I'll have a look at overriding the painting methods, maybe it is less complicated than I think...

I'm also really missing a good reference on synth, I got to define styles for the JProgressBar for example, and I don't have any idea how to do that...

Thanks for the info!

I agree. Here's the link: http://aspose.com/file-tools
subject: Using synth only for certain components?
It's not a secret anymore!