| View previous topic :: View next topic |
| Author |
Message |
BigDaddy
Joined: 26 May 2006 Posts: 147
|
| Does anyone know how to add an Image to a JFrame |
| |
|
|
|
|
SilviaL
Joined: 10 Jun 2006 Posts: 2
|
| You can only add Components to Containers. |
| |
|
|
BigDaddy
Joined: 26 May 2006 Posts: 147
|
| I tried to solve the problem with an ImageIcon but i can not resize the ImageIcon |
| |
|
|
Trendi
Joined: 25 Jun 2006 Posts: 16
|
| New JLabel(new ImageIcon(someImage.getScaledInstance(...))); |
| |
|
|
BigDaddy
Joined: 26 May 2006 Posts: 147
|
Is someImage an Instance of Image (new Image("foo.gif))
And How can i make a jwindow transparent? |
| |
|
|
Trendi
Joined: 25 Jun 2006 Posts: 16
|
| You can fake transparency with screenshot taking, but it sucks ass, check out java.awt.Robot if you insist on it |
| |
|
|
Keith Maclaine
Joined: 23 Jun 2006 Posts: 12
|
| BigDaddy, JComponent has setOpaque(boolean), but you may be asking a slightly different question. |
| |
|
|
Trendi
Joined: 25 Jun 2006 Posts: 16
|
| And JWindow is not a JComponent and doesnt have setOpaque |
| |
|
|
BigDaddy
Joined: 26 May 2006 Posts: 147
|
| Can i cast a jwindow to a a jcomponent |
| |
|
|
Trendi
Joined: 25 Jun 2006 Posts: 16
|
BigDaddy, no
He means a special type of casting
Typecasting |
| |
|
|
| Page 1 of 2 |
Goto page 1, 2 Next |
|