|
Replies:
3
-
Last Post:
Oct 10, 2008 10:42 AM
by: Shai Almog
|
|
|
|
|
|
|
Painting an image on a form
Posted:
Oct 9, 2008 3:06 PM
|
|
|
Hello,
I am trying to create a form that has an image which height is bigger that the screen height. So I want to be able to scroll up and down to see the image.
The form should also have a title and commands.
I was trying to achieve this by using the paint method and g.drawImage(image, 0, 0). The image shows correctly, and it is scrollable, but the title and the commands isn't showing.
How should I do this to get it work?
|
|
|
|
|
|
|
Re: Painting an image on a form
Posted:
Oct 9, 2008 4:41 PM
in response to: mrjansa
|
|
|
I solved the problem by putting the drawImage()in a Painter and then adding the painter to the form the following way: this.getContentPane().getStyle().setBgPainter(painter);
The reason why I want to put the image in a paint method is that I want to draw other things on the image.
Message was edited by: mrjansa
|
|
|
|
|
|
|
|
Re: Painting an image on a form
Posted:
Oct 10, 2008 6:16 AM
in response to: mrjansa
|
|
|
Btw, how do I get the height of the commands menu?
|
|
|
|
|
|
|
|
Re: Painting an image on a form
Posted:
Oct 10, 2008 10:42 AM
in response to: mrjansa
|
|
|
|
|
Hi, take a look at this: http://lwuit.blogspot.com/2008/07/motion-madness-physics-gone-wild.html
> Hello, > > I am trying to create a form that has an image which height is > bigger that the screen height. So I want to be able to scroll up > and down to see the image. > > The form should also have a title and commands. > > I was trying to achieve this by using the paint method and > g.drawImage(image, 0, 0). The image shows correctly, and it is > scrollable, but the title and the commands isn't showing. > > How should I do this to get it work? > [Message sent by forum member 'mrjansa' (mrjansa)] > > http://forums.java.net/jive/thread.jspa?messageID=304426 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net >
Shai Almog http://lwuit.blogspot.com/
[att1.html]
|
|
|
|
|