How to add smiles for java chat application [closed] - java

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to add emoji for a java swing chat application.But I couldn't success yet. Anyone helps me.Thank you.

There is no universal standard for a "smile" icon.
Chat clients that support smilies and other icons send a special code across the wire that the chat client interprets and renders as a smile.
You can take the same approach.
A simpler but more limited approach is to use the Unicode Emoticons (make sure they are properly rendered in your client app though, as not every platform properly renders every Unicode character.)
http://unicodeemoticons.com/

Easy.
Firts, you need print on screen the messages using a JEditorPane, this Swing Component allows you print images and text.
Display images using JEditorPane
The next step is create a "scanner method" to identify "Unicode Emoticons" like ':)' or ':P', etc. If the scanner identify a "unicode emoticon" change this characters for a string with the image corresponding.

Related

How to add Interactive animations in jFrame? [closed]

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 1 year ago.
Improve this question
I need to develop a Java programe using NetBeans. And In a JFrame I need to add a a image of planetary system and when the user sets a date and a time, Planets should rotate to their relevant positions. I don't have any idea about this yet. What is the possible way to do this? Please tell me soon
There are literally dozens of ways this might be achieved.
You could use:
Swing Timer
The Timing Framework
Trident
java-universal-tween-engine
The last three are animation engines. Personally, I use the Timing Framework, but that's more to do with what I'm familiar with and my needs at the time.
You'll probably need to do a lot of custom painting to get this to work, take a look at:
Custom Painting
2D Graphics
For more details

How to send output to a Text Area In HTML? [closed]

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
I am developing a web-based POS,
I have a grid of items which can be purchased.
I want to display the name of the chosen Items
in a text area, as they are being selected.
How can I do that? Java Label? HTML Text Area?
I am a bit lost.
Thank You.
Take a look at this tutorial on Oracle's site. Intially you can set the text value in the constructor but as you add items to your transaction, you can use the append() method to add more lines to the textarea.
You could use a JList which will allow you to add items to a list. It will also allow you to customise the way that the content is rendered as well.
Take a look at How to use Lists

Add image between text in JEditorPane [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
So I know how to insert an image in the JeditorPane in Java. But for example I would like to put the image between (for example) the 3 and 4 line of text in my Jeditorpane.
It's like in Gmail where you can edit your Signature and you can put some images in it..
What I am trying to do is an email service provider and I would also like to make my own Signatures...
What you need is a HTML Editor with live previe:
Ekit seems fairly light (160Ko in one jar, source and jar here)
(source: hexidec.com)
Set content type to text/html and JEditorPane will start rendering the assigned text as HTML. This question explains how to put images. No third party library is necessary, unless you want to use HTML features above 3.2.

Swing drag and drop [closed]

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 8 years ago.
Improve this question
I would like to implement a game board in swing (needs to be a table, though about either jtable or gridlayout etc ...) where I will be able to drag and drop a picture on to this game board and all the cells that the picture fell on will get a notification that they were chosen.
Can anyone help with that? how do I get a couple of cells in a table know that an object was dropped on them?
Have a look at this tutorial.
I think you have to spent some time with Google. I found the following with a little time with Google.
Introduction to DnD
How to drag and drop with Java 2, Part 1
How to drag and drop with Java 2, Part 2
Drag and Drop Effects
Hope this helps :)
Read this and if you have an more specific questions come back and ask them.

How to create a helpful tooltip in Android [closed]

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 would like to create a tooltip like thing in Android to help show my users what something is, as people have told me they don't know what it is. For an idea of what i'm after here is a drawing:
This is the QuickAction UI pattern. Take a look at:
GreenDroid, a collection of Android widgets - namely the QuickAction... widgets such as QuickActionBar, QuickActionGrid etc
How to create a QuickAction dialog in Android
another alternative would be "super-tooltips":
https://github.com/nhaarman/supertooltips
here's a demo of it:
https://play.google.com/store/apps/details?id=com.haarman.supertooltips
There are several libraries available that will assist you in implementing tooltips in Android.
I recommend the Android Tooltip library which you can find on Github
Example usage:
Tooltip.make(this,
new Builder(101)
.anchor(aView, Gravity.BOTTOM)
.closePolicy(new ClosePolicy()
.insidePolicy(true, false)
.outsidePolicy(true, false), 3000)
.activateDelay(800)
.showDelay(300)
.text(R.string.hello_world)
.maxWidth(500)
.withArrow(true)
.withOverlay(true)
floatingAnimation(AnimationBuilder.DEFAULT)
.build()
).show();
For anyone just joining us from searching this.
This is a better Holo solution https://gist.github.com/romannurik/3982005
You could use android-formidable-validation's .betterSetError() feature, customising the ErrorPopup balloon's background drawable and the error exclamation mark icon that gets set as the drawableRight in the EditText. To fine tune to your requirements you'd need to play with the code that lays out the ErrorPopup.

Categories