I'd like to learn android programming, I already know java, and I have already compiled all the simple "Hello world" tutorial apps I could.
I want to do something with a basic touchscreen interaction, and canvas drawing. Just "get the touch position and draw a dot there".
Can you recommend some tutorial about graphics/canvas on Android? I just want to get started, knowing all do's and don'ts for a simple situation such as this.
You will probably encounter the Canvas system. Therefore you should start with this tutorial series, where you will learn how to interact using MotionEvent.
Below link might help you http://marakana.com/tutorials/android/2d-graphics-example.html
You should look here in the documentation.
Related
I'm trying to play video within a JFrame, I've been looking around online for a while and everything I have tried (VLCJ, Xuggger i think its called) doesn't work, the errors I get can I can never seem to fix, the closest I have gotten is using JMF which is very old, it can never play a video file but as mentioned, it's the furthust I've gotten. Is there any good little API's / examples I can look at?
Thanks.
I guess that depends on the video, however there are a few build in mechanism.
You could use java fx http://docs.oracle.com/javafx/2/media/simpleplayer.htm
And then build javafx into your JFrame, like here: http://docs.oracle.com/javafx/8/embed_swing/jfxpub-embed_swing.htm
If embedding in java seems to be a bad solution, there is always the possibility to open the systems media player:
Desktop.getDesktop().open(new File("the.mp4"));
i want to make an app in java which will run on browsers like following links:
http://phet.colorado.edu/sims/geometric-optics/geometric-optics_en.html
http://www.onlinemathlearning.com/ray-diagrams.html
i am new in programming.
how can i start creating it in java?
Please give me any suggestions.
See How to Make Applets which has an example of a Swing Applet with animation.
i am new in programming.
It won't hurt to read the rest of the tutorial as well since it contains most everything you want to know about Swing.
I'm developing a desktop application using java + SWT/JFace, which I'm not very familiar. The program need to show some pictures presenting the program's progress like this.
Sorry for my poor English, I'm not sure whether it's suitable to use the word "moving", actually I mean that the diagram is changing like Flash when an event occurs. I'm considering making some flash movies to play, but it seems difficult as I need to add third-party jars and I'm not good at flash. Is there any better way to doing work like this? I need your suggestion.
Thank you and sorry for my poor English again if I made some English mistakes that troubled you :)
You can use java2d and the awt-swt bridge or there is a framework called Timing Framework which works for swt and swing.
probably you need a gif embeded in your window. java cannot paly any animations unless you have series pictures and play them one by one very soon.
I m currently working on my project of remote desktop administration. I m using robot class to capture images and send over network. It works well but bit slower.
Because all the time we need to captuure and send image its too costly. Is it possible to detect only a portion of screen which is changed and send only that portion?
Please any one guide me on this. Thank you!!!
The keyword you're looking for (in order to be able to look this up and figure the solution yourself) is dirty rectangles.
You can look into some code here.
I looked into this awhile back, and the image capture is implemented particularly inefficiently. I don't recall the specific detail, but it was pretty bad the way they did it. I felt, at the time, that the only way to do it better would be to implement it in JNI. Which you could use JNA to shortcut.
I don't know if any platform's screen capture routines will allow only changed sections to be sent, but you could implement a decent image diff; although that could get expensive too. You would really need to measure whats going on to see if it works for you.
I am used to making web pages with animation using JQuery. I am now making a Java Desktop Application using Netbeans and Netbeans' Swing and without any animation it's looking pretty plain and boring.
Are there any resources I can use for a guide to implement animation into my program?
Does anyone have suggestions on what method to use?
Edit: I am not interested in something I'd have to buy.
A good starting point would be Filthy Rich Clients. Both the principles and the framework code may be helpful to you.
If you're looking for a nice look and feel then Substance might be a good way forward. It's not over-the-top animated or anything like that, but it's got a lot of skins and some in particular look very nice.
Many thanks to stemm who pointed me in the right direction.
I decided to use JavaFX (JavaFX 2 to be exact)
Here is some resources I am using:
http://download.oracle.com/javafx/
http://download.oracle.com/javafx/2.0/swing/jfxpub-swing.htm