2

I'm creating an app in Java using Swing and Synth. I want to set image background to JFrame using Synth. How to do it?

m4tx
  • 4,060
  • 5
  • 34
  • 61

2 Answers2

1

There weren't better solution, so I decided to draw the background directly on the JFrame using Java2D (although I don't have the code now).

m4tx
  • 4,060
  • 5
  • 34
  • 61
1

JFrame haven't implemented Color, you can do that

1) JFrame#getContentpane.setBackground(Color c)

better would be

2) JFrame#add(JPanel#setBackground(Color c))

mKorbel
  • 109,107
  • 18
  • 130
  • 305
  • No no no... I want to set background using Synth, not pure Swing. Btw., I forgot to add that I want image background. But thanks for help. – m4tx Jan 17 '12 at 05:11
  • 1
    Although it's not L&F specific, maybe something like [this](http://stackoverflow.com/a/5129757/230513)? – trashgod Jan 20 '12 at 04:15