Results 1 to 5 of 5
- 01-15-2015, 11:55 AM #1
Senior Member
- Join Date
- Mar 2013
- Location
- Greece
- Posts
- 183
- Rep Power
- 8
PopupMenu and JEditorPane String to Image conversion
Hello all.
I am working on a simple online chat program. I have build the server services and generally everything works smoothly.
My chat GUI looks like the image above :
Now for the input area i use a JEditorPane as like the output message area. The reason of choosing JEditorPane is because i want to apply some CSS on future.(If you can to suggest anything better ok :) ).
Now under the input message area there are two JButtons. One for attachments and other one for emoticons. Now i am trying to make a Popup Menu with all my Emoticons Images when someone click the JButton(emoticons). I was thinking about a JList inside a popupMenu but that kind of thing is mostly impossible i guess. So If anyone has any idea of how can i implement this thing then i would like to hear it. (something like emoticons list i this Forum and if someone know a free good resources(gifs or images) will be nice too)
Also would be nice if someone can tell me a way to automaticaly convert String to images for example when someone type in inputJEditor something like this :) or this :( to convert it to emoticon imageLast edited by ShadowWalker; 01-15-2015 at 12:41 PM.
- 01-15-2015, 12:37 PM #2
Just a guy
- Join Date
- Jun 2013
- Location
- Netherlands
- Posts
- 5,114
- Rep Power
- 13
Re: PopupMenu and JEditorPane String to Image conversion
I would focus on one thing at a time, and thus ask one question at a time. Now you run a great risk of this thread turning into a minefield of disjointed answers and suggestions because different people will zoom in on different questions.
"Syntactic sugar causes cancer of the semicolon." -- Alan Perlis
- 01-15-2015, 12:42 PM #3
Senior Member
- Join Date
- Mar 2013
- Location
- Greece
- Posts
- 183
- Rep Power
- 8
Re: PopupMenu and JEditorPane String to Image conversion
Hmm i guess you have right..So i remove the Error message and the question about the error and i will make an onother post about that (maybe in advanced section)
if again my post has too many and different questions then i will try to edit again.
The main question actually is how to make a Menu with emoticons by pressing the emoticonsButton. I was thinking about a PopupMenu but i don't know how to implement it.Last edited by ShadowWalker; 01-15-2015 at 12:45 PM.
- 01-15-2015, 01:58 PM #4
Just a guy
- Join Date
- Jun 2013
- Location
- Netherlands
- Posts
- 5,114
- Rep Power
- 13
Re: PopupMenu and JEditorPane String to Image conversion
You know about the Swing tutorial I hope? It has an incredible amount of examples. There isn't a thing in the world that I wanted to do with Swing that I didn't figure out using it.
Lesson: Using Swing Components (The Javaâ„¢ Tutorials > Creating a GUI With JFC/Swing)
The custom combo box example (a combo box with a custom renderer) might be a way to go for example:
How to Use Combo Boxes (The Javaâ„¢ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)"Syntactic sugar causes cancer of the semicolon." -- Alan Perlis
- 01-15-2015, 02:08 PM #5
Senior Member
- Join Date
- Mar 2013
- Location
- Greece
- Posts
- 183
- Rep Power
- 8
Similar Threads
-
Image and Hyperlink issues (JEditorPane
By cfc1252 in forum AWT / SwingReplies: 0Last Post: 09-14-2012, 06:42 PM -
conversion of image in to binary and text
By Balasubrahmanyam in forum New To JavaReplies: 9Last Post: 07-27-2011, 03:51 PM -
Conversion from BufferedImage to SWT Image
By Jonah Bron in forum New To JavaReplies: 1Last Post: 06-27-2011, 03:40 AM -
Need conversion mechanism for converting 24 bit image to 16 bit
By jairainbow in forum New To JavaReplies: 2Last Post: 10-04-2010, 03:50 PM -
How to display image in JEditorPane
By usccar in forum New To JavaReplies: 1Last Post: 12-10-2009, 07:34 AM
Bookmarks