Results 1 to 5 of 5
Thread: [SOLVED] Text Box Help
- 05-04-2009, 01:31 PM #1
Member
- Join Date
- Jan 2009
- Posts
- 32
- Rep Power
- 0
[SOLVED] Text Box Help
HelloJava Code:import javax.microedition.lcdui.*; public class TextMessagingForm extends Form { private TextField mAddressField, mTextField; private TextBox mMsg; public TextMessagingForm() { super("New message"); mAddressField = new TextField("Mobile Number:", "", 20, TextField.PHONENUMBER); mMsg = new TextBox(null, "Message:", 120, 0x0); append(mAddressField); append(mMsg); } public String getAddress() { return mAddressField.getString(); } public String getMessage() { return mMsg.getString(); } }
I am making a SMS application for my Uni course work and I am having some trouble with this part: "append(mMsg);" This part says: cannot find symbol???
Any ideas? Any help would be great.
Maybe I am doing the text box wrong or something I don't know, I found that code for a text box on a web site on google.
Thanks,
Chris
Edit:
Just to add this form is in a separate .java file than my main code and its just sort of imported into and displayed.
Also I am not sure if this is the right forum for this or not, if not then im sorry :)Last edited by ChrisMayhew; 05-04-2009 at 01:33 PM.
-----
Chris
- 05-04-2009, 01:47 PM #2
Iam not sure about thius microedition.But as per the api if u want to store some text u have to use
setString as per the api
gothru this link
Java > Java SE, EE, ME > javax > microedition > lcdui > TextBox _ Java API By Example, From Geeks To Geeks.Ramya:cool:
- 05-04-2009, 02:09 PM #3
Member
- Join Date
- Jan 2009
- Posts
- 32
- Rep Power
- 0
- 05-05-2009, 10:36 AM #4
You can't append a TextBox to a Form. TextBox inherits from Displayable, not Item.
You can however Display#setCurrent the TextBox to display it.
db
- 05-08-2009, 01:06 PM #5
Member
- Join Date
- Jan 2009
- Posts
- 32
- Rep Power
- 0
Similar Threads
-
how to use live validation with autocomplete in dojo text boxes in <s:text box>
By subashm28 in forum Suggestions & FeedbackReplies: 2Last Post: 01-23-2009, 04:09 PM -
printing simple text as text on printer
By Nicholas Jordan in forum Advanced JavaReplies: 0Last Post: 12-01-2008, 01:42 AM -
find and replace text from a text file
By gezzel in forum New To JavaReplies: 2Last Post: 09-19-2008, 04:04 PM -
Unsupported Content-Type: text/html Supported ones are: [text/xml]
By luislopezco in forum Advanced JavaReplies: 0Last Post: 05-26-2008, 04:26 PM -
map javax.swing.text.Element to javax.swing.text.View
By elizabeth in forum New To JavaReplies: 1Last Post: 07-30-2007, 07:02 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks