Hyperlink in J2ME - java

How I create hyperlink in J2ME?
After click the string item J2ME has to open website in system web browser.

See the same discussion on nokia forum. It will helps you.

Better create your own Button component by extending Item class and overriding paint to draw text with specified font and underlined and also you can add Action listener to it so that you can perform action
usable in forms too.

you need to use Platformrequest method to launch link in webBrowser .
Just check string is valid web address or not.

Related

JavaFX: How can I get the character the represents the platform specific SHORTCUT key code?

I am writing a JavaFX application and I have used accelerators to add shortcut keys to the application menus.
Now I am creating the application help and I want to describe the usage of the shortcut keys.
The recommendation for JavaFX accelerators is to use SHORTCUT instead of CONTROL (Windows) and COMMAND (Apple). This works fine and in the menus when running the application on different platforms show the right key combination.
For example, MenuItem Exit I have added the accelerator SHORTCUT_DOWN + X which is displayed as
Ctrl+X under Windows
and
⌘+X under Mac OS
Now I would like to get the explanations (Ctrl+X, ⌘+X) from the system in order to add it to the user help.
Is it possible to ask JavaFX for the presentation of the accelerator in the menu? Or get the presentation of SHORTCUT_DOWN used in the menus?
Thx in advance
Thorsten
According to the documentation, the getDisplayText() method
Returns a string representation of this KeyCombination that is suitable for display in a user interface (for example, beside a menu item).
So all you need is
String acceleratorAsString = menuItem.getAccelerator().getDisplayText();

how to get a blank canvas on which I can write using stylus

I am creating a service application where in the person who uses the service fills his data and signs it
Now I want to create a blank page where I can take the signature of the client on the TAB itself. So please help to do this.How can I implement it.
I have refereed to this http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Paths-Creating.html link but some how I am not able to work with it.
Please help.Thanks
You can do it using GestureOverlayView. Example in the links: http://www.intertech.com/Blog/android-gestureoverlayview-to-capture-a-quick-signature-or-drawing/
Specifically, create a GestureOverlayView in your layout xml file, then in your Activity class capture the gesture and save it as bitmap image.
Go through the developer API if you want to have specific function for your page, especially for events like Gesturing or Gesture Finish : http://developer.android.com/reference/android/gesture/GestureOverlayView.html
Hope that helps

How to display clickable hyperlink in Papplet Java application?

I know how to display simple text with the processing.core.PApplet.text method.
But this one can't display clickable hypertext link. How could I make that in Papplet ?
I precise that link should open the web browser.
Thanks.
It's not documented on the main Reference page at http://processing.org/reference/, but you can use a function called 'link()' ... it takes up to two parameters - the url to go to, and if the second argument is supplied, sets whether to open a new page or not...
Eg.
link("http://www.processing.org", "_new");

GWT hyperlink problem

i am using GWT Hyperlink for Click handling.I used rpc for showing the records in a dialog box by clicking on that link.but it is moving to home page immediately and showing the dialog box there.Please suggest me the solution for this problem.
Hyperlink should be used in combination with History (http://code.google.com/intl/nl-NL/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.html) changes and not for click handling alone. When using Hyperlink the History token is updated, which will probably trigger the History change which will direct to the homepage, Next the click is handled which shows the dialog
EDIT:
Just as David mentions it's better to use the Anchor widget. Because Anchor is a native html element A, it's usability is better over using a span or div.
I concur with Hilbrand, but recommend anchor tags in such cases.
<g:Anchor name="whatever">Click me</g:anchor>
For this case I would suggest you to use CustomButton instead of HypherLink. For that custom button give some styles to look like a hypherlink. If you use label you cannot focus using keyboard.
Use hypherlink only if you are planning to give history support.

Hyperlink in JTextField

Is there some way to display text as hyperlink in JTextField so that when user presses it opens the link in a browser
You can't do that. Instead you want to use a JEditorPane:
http://download.oracle.com/javase/tutorial/uiswing/components/editorpane.html
Technically, you can override some methods of JTextField, like onClick(..), so you can check what you clicked at and if it starts with "www" or "http", open default web browser with that link as a parameter. But try to look at other text components, probably there will be some that can open link "by default".

Categories

Resources