Does JFrame work on Android / iOS? - java

Recently I have been programming a game in Java without using anything like OpenGL, I have just been using Java and Java alone. I use JFrame for some stuff in my game and was wondering if it works on Android or iOS in case I want to make mobile games.
I am rather new to programming in Java, I know some of the basics but I just don't know all the answers and searching online isn't helping that much. This also sounds really nooby, but does JFrame work on Mac & Linux too? I have heard that it does, but if not I might consider learning how to use OpenGL or something, but some of the tutorials on OpenGL I've found turn out to be bad.

Unfortunately java swing is not supported by android. This means swing classes will not be usable in android environments so classes like JFrame will show up as errors when you move it over to android studio. Android does support OpenGL and this would be usable. Android does its UI through XML and it might be possible to use this. but it will require many changes. You will be able to move over all of your classes that do not reference external libraries, or libraries like java swing. You will need to re-write the parts of your code that deal with the JFrames though :/

Related

Android (or Android compatible Java) library to draw editable flow chart diagrams

I'm developing a flow chart drawing tool for Android and even though it has been a month I still couldn't find a good, reliable graphics library to help me develop this app.
Here are a few things I tried:
1-) Android views. Since a flowchart would naturally include lots and lots of shapes, this option wasn't satisfactory in terms of performance. Plus, I didn't even know how to draw arrows.
2-) Canvas. It was quite good when it comes to performance but canvas does nothing more than coloring pixels, so I can't go back to editing them after placing a shape on the screen.
3-) Now I'm working on Qt to see if I can achieve my goals and so far it seems as though it's very doable but using a cross-platform development software for only Android doesn't make a lot of sense.
4-) Libgdx and Unity are also options but using a game engine for such a lightweight app didn't seem like a very good idea to me.
Can you suggest me a good library or any other development tool?
There is https://github.com/mocircle/cidrawing library. Maybe useful for this type of task with link to https://github.com/Team-Blox/GraphView library.
Hope it helps.

Modifying the LIBGDX Application frame in desktop

I'm currently using libgdx and I am looking for a way to modify the frame/window. I'm looking through google for maybe tutorials and examples but I'm not really sure what to search for. What would be the correct term to look and if anyone does have any examples/tutorials then I'd appreciate them posting them.
This is for desktop.
On the desktop Libgdx uses LWJGL to access OpenGL and desktop APIs. You should be able to use LWJGL APIs from your desktop backend if you need to.
You will have to be much more specific about what you want to "modify" about the "frame/window" if you want a more precise answer.

use pygtk for android apps development

I want to use pygtk app for android app development. I want to use app like pygtk which will have easy drag and drop options for developing the front end for android application.
Is there any of such thing which can let me design my front end for android app with drag and drop? (specially in python or else in java)
I see you tagged the question with kivy, I can only answer that we don't have such a thing for kivy yet, although a GSOC student got accepted for this and will start working on it soon, let's hope it'll work out nicely :). I'm of the opinion that the kvlang we have in kivy makes the need of a Graphical Designer far less than in other toolkits, but i guess YMMMV.
Other than that, I don't think you can do PyGTK development on Android currently, but I think PySide works, so maybe QtDesigner or some other Qt design application would be worth a look?

Porting Java OpenGL-based Android game to iOS (no native code)

I might be a little screwed here. I've been developing an engine for use in various games that I've been making for a long time now.
The engine is written in 100% Java(no NDK), and uses OpenGL ES 1x for rendering. its got textures, 3d mesh loading, animation, image based fonts, tilemaps, custom file types, and all that good stuff at around 8.5k lines of code, so you can probably see why I wouldn't want to recreate all that on iOS :(
Anyways, some of the engine relies on the Android SDK, but those parts can easily be removed/changed, leaving just the engine code and calls to opengl. However, never having developed anything on iOS before, I am a little clueless as to where I should begin with the porting.
I know that you need to develop using XCode(or is it objective-c?) on iOS, but would it be possible to use Java instead?
I would greatly appreciate it if anyone could just point me in the right direction. It would really suck to have to rewrite my entire engine in a different language.
No, there is no way to compile java code so it can run on ios ,and propably will not be in the future either because of the nature of the ios witch is a close platform .
Your best choise here is to rewrite your code to c witch i think its not very difficult since opengl commands stays the same plus you will see a performance boost

Android flash vs Java

I've been thinkin about games on android and was thinking - isn't it EASIER to make a game in flash than in android using Java with android SDK ? I've only experience with Flash/AS3 and it's quite easy to create user interface, animations, layout and to write scripts.
As of Flash CS3 there are motion detection objects, so we can create really interactive games.
However I've not seen any flash game related for a phone( I mean with orientation and so ). Is there something I am missing like flash too slow on a android enabled phone?
This applies to applications too. I would like to hear opinions about Flash vs Android :)
you can create game in flash and adobe air will convert it in apk. adobeAir is version where you can create any game and just 2 or 3 step that convert it in apk.so you can publish it or play it in your android phone
Flash is not supported on Android 2.1 and lower, and some manufacturers no longer provide software updates for their older devices. I think Flash will also probably be slower (which may not be an issue if your game isn't very computation/graphics heavy) and consume more battery. It also doesn't take advantage of multi-core processors right now, but that may change in the future.
On the other hand, if you write your game in Java for Android, you will be limited to one platform.
As a compromise, you could try something like Haxe, which allows you to compile your code into flash, Java and C++, among others.

Categories

Resources