C
Chris Nevill
Hi.
I'm developing a chat program currently it has a text box at the bottom
which when the enter key is pressed sets of an Action Listener,
so that the text can be sent....
All was well and good till I tried to add formatting options to it.
I want to be able to make part of the text bold etc, as the actual
message window is HTML based.
However if I turn the textentry box in to a JEditorPane I don't get
an AddActionListener method.
so i can't detect the enter key being pressed.
JTextField only seems to allow you to set formating options
on the whole box, and doesn't do it in HTML which would be favourable....
I tried taking the addActionListener method from JTextField and extending
JEditorPane... but as expected it didn't work..
Any Ideas?
Cheers
Chris
I'm developing a chat program currently it has a text box at the bottom
which when the enter key is pressed sets of an Action Listener,
so that the text can be sent....
All was well and good till I tried to add formatting options to it.
I want to be able to make part of the text bold etc, as the actual
message window is HTML based.
However if I turn the textentry box in to a JEditorPane I don't get
an AddActionListener method.
so i can't detect the enter key being pressed.
JTextField only seems to allow you to set formating options
on the whole box, and doesn't do it in HTML which would be favourable....
I tried taking the addActionListener method from JTextField and extending
JEditorPane... but as expected it didn't work..
Any Ideas?
Cheers
Chris