SFML community forums

Bindings - other languages => Java => Topic started by: white2demon on January 22, 2015, 07:50:55 pm

Title: Update window?
Post by: white2demon on January 22, 2015, 07:50:55 pm
How to update the window in JSFML???
Title: Re: Update window?
Post by: Hapax on January 22, 2015, 10:05:40 pm
https://github.com/pdinklag/JSFML/wiki/Windows

I found this thanks to the liesard's reply to your other message (http://en.sfml-dev.org/forums/index.php?topic=17313) which suggested that you should try to figure things out for yourself. Therefore, I don't think anything more specific should be needed.
Title: Re: Update window?
Post by: Jesper Juhl on January 23, 2015, 01:19:10 pm
I have rarely seen posts where this document has been more relevant: How To Ask Questions The Smart Way (http://www.catb.org/esr/faqs/smart-questions.html).
Please read it in full - twice.
Title: Re: Update window?
Post by: white2demon on January 23, 2015, 03:21:14 pm
If I write here , so I don't understand? (I apologize in advance , I am Russian and have problems with English). Could you give the code exactly? It is necessary to redraw the window. As add new objects
Title: Re: Update window?
Post by: Hapax on January 23, 2015, 10:36:18 pm
Sorry. I don't Java.
Title: Re: Update window?
Post by: white2demon on January 24, 2015, 05:14:28 pm
How to redraw the Window? (Repaint)
Title: Re: Update window?
Post by: math1992 on January 24, 2015, 06:22:26 pm
Simply use the link Hapax gave you:

//Fill the window with red
    window.clear(Color.RED);

 //Display (Redraw the window)
    window.display();
 
Title: Re: Update window?
Post by: liesard on January 26, 2015, 12:27:21 am
Also, you can totally check out this thing that I wrote: https://liesard.wordpress.com/2015/01/11/basic-jsfml-setup/ (https://liesard.wordpress.com/2015/01/11/basic-jsfml-setup/)
(Shameless self-promotion, I know :P )

Just keep in mind that the forum is not here to teach you how to program, but rather to solve problems specific to your need.  For example, gravity and collision in a game.  Something like that.