Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am looking for a program to show a slotmachine animation (preferablly written in Java/SVG). I'm interested in showing the rotating wheels with images of my own choice.
I have found
http://www.doit.org/java/slot/SlotMachine.java
which is the source code for an Applet.
http://www.cs.columbia.edu/~sh553/teaching/w3134-s07/review/SlotMachine.java
Basic Slot Machine
do not have graphic support.
I am hoping there might be better/other solutions I could use for showing on a webpage.
http://www.treebuilder.de/default.asp?file=163540.xml
shows an SVG solution - this might be the closest to what I am looking for so far.
so far i could test the above applet by making a standalone java app from it. It works for the graphic part - the audio issue is discussed in
how can i run an applet as an application?:
I will now at least be able to try out other graphics without needing the applet params to be defined in a web page. I'd rather have a standalone solution e.g. like a restful Java app.
See Wheel, part of a larger project by Jernej Vicic, and this later variation, incorporated into a project by Mark Boyns.
It looks like you have examples of a slot machine model. For the view, you might look at this answer that suggests using Unicode glyphs or implementing the Icon interface. Also, consider this MVC example and this answer that illustrates rendering a BufferedImage.
Animating the visible face is straightforward, but a pseudo-perspective for adjacent facets would require a trapezoidal transform, available in JAI.
Addendum: How can I run an applet as an application?
Several examples of the hybrid approach are cited here. Note that applets, too, must be constructed and manipulated on the event dispatch thread. Also consider Java Web Start for deployment.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Im quite good with writing text based programs using Java and ill like to proceed to writing GUI programs and animations ive checked several youtube playlists and they dont seem do helpful so i would appreciate any tips on where to start.
For desktop applications, You should start with Java Swing.
Swing API is a set of extensible GUI Components to ease the
developer's life to create JAVA based Front End/GUI Applications.
There are some good tutorials, I would suggest the following:
JavaTPoint and TutorialsPoint
After completing swing, you can move on to JavaFX.
JavaFX is a set of graphics and media packages that enables developers
to design, create, test, debug, and deploy rich client applications
that operate consistently across diverse platforms.
For that, you may follow to begin with
code.makery
Sounds as a great question, but not self explanatory. Before making assumptions just ask your self -
Do I feel myself as Web developer or a Desktop(Core) developer?
From a prospective of Desktop developer - take a look at Swing - it allows to make GUI forms and etc. If you decide to learn web, then take a look at Vaadin (which is made on top of GWT, and easier to dive in)..
Both of them have simlar syntax, so it would be always easier re-qualify...
UPDATE: While you still decide where to go, see this humble example of Vaadin Application
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I read about the advantages of JavaFX over Swing(that is not the point of discussion) and I would like to learn JavaFX.
But later I got confused between the JavaFX script and other things like XML, etc...
I don't have a clear picture of it yet.
I want to know what all things like basic information and programming/markup languages one must know before giving a try at JavaFX.
Well, as far as I am concerned, I would say nothing is mandatory, before you start learning Javafx. Just a small knowledge of JAVA would be enough (just the basics)
For Javafx learning resources, Oracle has one of the best available resources, enriched with lucrative examples, which will make your Journey of learning Javafx fantastic.
The fxml files are basically the UI which can be written using XML and can be loaded in your code. This makes your application follow the MVC rule. Though initially, I would recommend to spend sometime constructing your UI using java code only.
For more info on FXML
Java vs JavaFX Script vs FXML. Which is better way of programming in JavaFX?
Tutorials on Javafx
http://docs.oracle.com/javase/8/javase-clienttechnologies.htm
For Beginners, Getting Started with JavaFX is very important !
http://docs.oracle.com/javase/8/javafx/get-started-tutorial/jfx-overview.htm#JFXST784
Tutorial on Scene Builder i.e. making fxml files for your application,
http://docs.oracle.com/javase/8/scene-builder-2/get-started-tutorial/overview.htm
Tutorial on FXML
https://docs.oracle.com/javase/8/javafx/fxml-tutorial/
I started learning JavaFX last summner and it is really great and easy to use. I don't think you should know anything before start learning. A little bit xml knowladge can be beneficial but I don't think it is necassary because JavaFX secene builder generates .fxml files generically. So you can directly start using it.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
unfortunately i did not find out the right formulation of my question.
Everything i want is to create a map of an antic "city" (or camp) and make it clickable. That means after clicking on a house on that picture of map i would like to go "into" that house and see something else for example run the video or see the house from inside. I have no clue what programming language to use for this task. I would prefer Java. The thing is that it is online so it has to be working with a wordpress.
Any advice will be appreciated! Thank you so much.
If it has to be online, then Java is very poor option. Although it is possible to embed Java applets in a website, it will require users to have Java pre-installed and probably require you to sign your applet with an expensive certificate.
From the description of what you'd like to do, it seems that just HTML will do the job perfectly. Not even Javascript is required. I'd suggest the following:
Create a HTML-page with the image of the "map of an antic city", that was made clickable using the HTML map tag. See this page for more info. Make sure the page is entirely filled with the image.
You would then need to create a separate HTML-page for each location the user may click on in the map.
On these pages, either include a new clickable image or a video, etc. Make sure these pages are entirely filled with their content.
Now include the first HTML-page we made (see point 1) using an IFrame in your Wordpress-website. See this page for more info.
The result will be a clickable map embedded in your website, where any clicks by the user will result in a new clickable map or a video, etc, that will exactly fill the area of the original map.
The most important: which programming language to use so it can be compatible with a wordpress.
AFAIU Wordpress sites do not support Java applets. Other languages that can embed a GUI in a web page might be ..Flash (though if WP does not support applets, I doubt they'll support serving Flash files).
Also look into HTML/Elements/map. It allows us to define a map that can point to various other links depending on which part of the image the mouse pointer is over.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
recently I have been making easy games such as 'blackjack' , quizzes, etc. How do I host these games online so others can play? Keep in mind these games do not use an application. Thank you
If your application is Swing/AWT based - and if you implement the game as a Component or JComponent - you can then, with minimal changes, make it run as both a Swing/AWT (i.e. desktop) application or as an Applet (embedded in a web page). You can make both run from the same .jar file, if you set it up right, and that file can also contain you resources (images, sounds). (It doesn't have too - but they you may need to load these resource in a somewhat different way, depending whether you are running as an application or applet.)
For the desktop, place you game component into a JFrame and display this (with appropriate sizing, etc).
For the web, place the component into an Applet. You will need a bunch of configuration and an HTML page with the applet in it. But once you have this you can host you game on any ordinary ISP site.
This may be a bit out of date, but: http://docs.oracle.com/javase/tutorial/deployment/applet/
I would suggest looking into Ruby on Rails for back end develoment: http://rubyonrails.org/
and Javascript for front end development: http://www.w3schools.com/js/
http://www.codecademy.com/ also has great lesson plans for building online games.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'd like some opinions please on a GUI for my computer vision application. I have written an application in C++ using OpenCV which captures video from a high speed camera, carries out some image processing on the images and displays the results to a HighGUI window. I find myself tweaking variables on a regular basis and have therefore decided it would be easier and quicker to tweak those variables using a GUI on the fly. I have a few options:
Create a Java GUI that can talk to my C++ computer vision app using sockets
Integrate my application within a QT GUI
Use native Windows calls (e.g. MFC)
Which do you you guys think is my best option, bearing in mind that the GUI or sockets must not detract from the performance of the image processing part of the application?
(My target OS is Windows)
Many thanks in advance everyone for your inputs.
I would consider option 1 or 2, 3 seams definitely the worst, because you have to write all related to gui code on your own and it will be not portable.
1. Instead of this option i would consider creating GUI in Java and putting whole c++ code into library and using it in Java or even using native c++ code in Java. This solution should be faster than sending data via sockets.
2. QT seams the best option - it has big community, lot of tutorials and partially is integrated with OpenCV(http://opencv.willowgarage.com/documentation/cpp/highgui_qt_new_functions.html). Another advantage is that application created with QT and OpenCV should run on many operation systems. Also you may use Qt Creator or visual studio qt plugin to create gui.
You really don't want to deal with platform native code on Windows. The API is archaic, just like MFC is.
I don't think there's any benefit to isolating the GUI in a separate process.
I'd suggest using Qt Quick. You can very efficiently display images from OpenCV by binding them to a texture on a trivial scene graph item. You get a fluid, modern user interface and performant integration with OpenCV at the same time. It all blends, so to speak.
The easiest way to integrate your variables with QML is by using model-view paradigm. You can expose the variables form C++ by reimplementing a QAbstractListModel. The variable's value could be bound to the edit and display roles. The variable's name can be exposed as an additional role, called for example name. It's then a simple matter to use a ListView in Qt Quick to display the variable list and allow it to be tweaked at runtime. You can easily have "fancy" delegates for your items, say sliders.