Embedding maps in java swing application - java

I'm developing a java swing application in which i need to show the map of some area and allow user to put markers on it.
I've goggled a lot on the topic but unfortunately i haven't got any how i can do it.
I came across some ideas like displaying a web browser in swing just like JXBrowser (i can't afford JXBrowser).
And i'm also not sure if this way will allow me adding markers.
Please guide me some proper way to do the trick.
Please do tell me if i can do it offline or online any way suitable.

Have you looked at OpenStreetMap? In particular JOSM

Related

Android - initial clicking tutorial

How to implement such a functionality in an Android application which presents to the user initial clicking tutorial (while running application for the first time)? It should look similar to how it is used in that application:
I've searched through forums, but did not find the answer.
I've already seen such a functionality in many other apps and its purpose is to show to the users the functionalities of the most important buttons/layout elements in the main activity of our application.
How to implement such a functionality? And how to indicate that user already completed "clicking tutorial" so it will not show for the next time?
Thank you in advance!
You can take a look at this library here ShowcaseView or here RoboDemo.
(I think "ShowcaseView" library is the one you're looking for)
Hope it helped.
TutorialView might fit your requirements.

Making an android app for a website

I'm trying to make an app for website that I DO NOT OWN OR HAVE ACCESS TO ITS DB.
The website is a forum community website and I wish make an app that can list the menu and the posts in a UI suited for mobile.
Also I am trying to see if I add real time notice function that will let the thread poster know when there is a new comment/post to his or her thread. (Website does not support this function)
Do you guys think I can achieve this through Jsoup or would I need other utilities too?
Also I am quite a beginner in java so the app cannot be too complicated.
Thanks.
It means that you want to write your own web browser! You need to call the Url get what it returns, parse it and show it... also you need to implement RSS to specific pages.. It means app need to call this url regularly and check if any changes or comments... Its do-able but wont really be efficient or bug-free... I wouldnt recommend it but as i sad do-able

Java Swing: how to create assist functionality to teach user how to use the software?

Is there a library out there that can facilitate in creating assist or automated guide that tells users what action to take?
Like it should notice the user is running the software for the first time so it will say click this button, and when the user does, it will explain other features.
sort of like what Youtube's video editor does but I wonder if this is achievable in swing.
I don't know what you call this...but below is a good example to aim for but something that works for Java Swing.
http://jeffpickhardt.com/guiders/
I would do this using JPanel or image and mouse events by setting their visbility properties. I haven't tried it but, I think I can...
I used these libraries which are for rich applications
http://java.net/projects/animatedtransitions/
http://java.net/projects/timingframework/
let me know if you found anything new.
thanks
from
vinay

Processing for Android and regular input apps

Processing has Android support and it seems to be pretty awesome from my 10 minutes of playing with it. But I would like to make a regular (nongraphics) application like a twitter feed reader or something. So is there something like Processing that can do regular apps? Besides Titanium...
Basically I am looking for anything that will make coding for android easier, processing was so easy to get working that I was very happy with it, but it is for graphics only. Titanium didn't give me the same wow factor and it isn't open so that kind of takes away from it. What other tools are out there?
I'm going to give you the answer you are looking for and some advice.
Processing can do ANY of the things you are thinking about doing. If you want textboxes etc, you can use the Control P5 library. It's great. If you are an expert at Processing and just want to port over your Processing code to android, Processing for android is great.
But that's not what you want to do. You want to write an application. And you want to write it on Android. There are frameworks designed to give you a leg up in writing cross-platform mobile apps, but nothing is going to make writing an android application easier than learning Java and learning how the android stack works. It's actually really well designed and easy to follow once you start grokking "intents" and "bundles".
At the end of the day, you might even want to scale back a little further. Are you trying to write an application that needs to be used without internet access or that uses super special phone APIs? If you aren't, maybe you should try just writing your app as an html5 css3 website.
You can do plenty of input based stuff with processing. The original mouse events work as specified, except pass touches, but you can also access things like pressure and multiple fingers down. The hardware keys are also supported.

Design a GUI for a J2ME app

How do I create a J2ME app for cellphones with a GUI similar to the menus you see in Java games? I've tried MIDlets with Netbeans but they only show you one GUI element at a time. (textbox, choice, login, etc)
And which Java IDE would you typically design these GUIs in? Netbeans or Eclipse? and is IntelliJ IDEA usable for this aswell?
Do I have to write/get a library that draws GUI controls to screen via bitmap functions .. and keeps track of the keys pressed for focus?
Try to use LWUIT - nice UI toolkit for j2me:
https://lwuit.dev.java.net/
http://lwuit.blogspot.com/
You can also use minime: http://code.google.com/p/minime/
It's an open source GUI library for j2me. miniME works on canvas level (lowest level in j2me) to draw every control so your UI will look exactly the same whatever the handset it'll be running on. Other advantage are:
- miniME uses its own event loop to manage user controlled event (botton pressed, softbar, ..), so you Application will "behave" the same whatever the handset.
- miniME support the concept of Views and stack of view, in order to make navigation between different view/screens very easy.
Here is an example: A View is what you have on the screen at a given moment (for example the main menu screen), then to go to a sub menu, you create a new view, and by calling a simple API, you push it in the stack of Views. The previous view (the main menu) is still existing, but inactive. When the sub menu view complete his work (for example, user press back, or do a selection), you can just go back to the previous view by calling a pop api.
Your question is a bit vague to give a specific aswer, but you might want to check out LWUIT or Polish, you can develop both with either Eclipse or Netbeans.
As far as designing GUIs go, neither IDE will help from a visual perspective. J2ME UI development is all done in code, beyond creating any initial graphics in a proper graphics editor you don't get to see your output until you test.
Read up on the LCDUI package documentation which explains how the UI classes work and the differences between the 'High-level' and 'low-level' APIs.
I can't comment on which IDE to use - but I do know that to create custom UI (like the ones you see in J2ME games), you have to explicitly draw the GUI controls.
Beware that you may need to customize the GUI depending on the target phones. You have to cater for different screen sizes, key pad configurations, default theme etc. This would probably mean that you need different builds for things like different screen sizes which would drive up your Java Verified certification costs (if you need it).
You may be able to find a set of nice looking UI controls that you can buy online and use (try J2ME Polish). The easy way out of course, is to use default J2ME controls :)
Links to many j2me GUI libraries: link1, link2
I know that kuix is not bad and free - watch demo.
But i prefer to make my own gui elements - this is much more flexible (but takes some time).
As for IDE - you may want to make some kind of gui-editor tool, construct interface in it, save result to some file, and read it from your app.
It's way too cumbersome to write your own GUI, especially since there are so many available these days. If you're familiar with desktop development in VB.Net and C#, you might find "J2ME GUI" easy to use. You can download it from http://www.garcer.com/. It has a similar feel and makes it easy to learn. This is the kind of GUI that I expected to come standard with MIDP2 when I started mobile development. Would have solved a lot of issues.
If you are familiar with web stuffs then you can use KUIX (kalmeo.org/home/index) framework having xml and css supports. In place of It you can use also Polish framework (www.j2mepolish.org) it's also uses the xml in easy way rather than kalmeo kuix framework.

Categories