Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Trusted Contributor
Himanshu_berry
Posts: 138
Registered: ‎04-19-2012
My Carrier: Nokia

Re: how to take new line

if you dont know that 

plz dont  comment personaly.

Please use plain text.
New Developer
steff2632
Posts: 53
Registered: ‎06-07-2011
My Carrier: o2

Re: how to take new line

I havent replied because your starting to annoy me. You have already been told three times how to do this, it's also clear that you don't understand Java and have been told that this forum is for the intricacies of BlackBerry development not for beginners learning java
Please use plain text.
New Developer
steff2632
Posts: 53
Registered: ‎06-07-2011
My Carrier: o2

Re: how to take new line

im going to tell you one last time how to do this

 try{
    	StringBuffer buf = new StringBuffer("Hello");
    	
    	for(int i = 0; i < 10; i++)
    	{
    		buf.append("\n");
    		buf.append("Hello");
    		
    		textView.setText(buf.toString());
    		
    		Thread.sleep(10000);
    	}
    }
    catch(Throwable t)
    {
    	t.printStackTrace();
    }

 this is untested but should work, or atleast give you enough knowledge for you to be able to do it on your own

Please use plain text.
Developer
simon_hain
Posts: 15,558
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: how to take new line

it is absolutely ok to try developing blackberry as a java developer, it is just a difficult thing to do as there are some special guidelines to be followed.

if you like pre-made code please look through the many samples that ship with the eclipse plugin.
the developer guide would also be a good read.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
simon_hain
Posts: 15,558
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: how to take new line

@steff2632:
your code is not recommendable as it uses thread.sleep on the event thread, i have written a short note about that above.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
rabiray
Posts: 141
Registered: ‎07-13-2011
My Carrier: Vodafone

Re: how to take new line

Hi Himanshu,

 

As Simon said..keep up your good work.

U r doing great buddy.

 

If possible post your screen class code if you want me to have a look. I dont mind.

 

Cheers

Rabi Ray

Please use plain text.
New Developer
steff2632
Posts: 53
Registered: ‎06-07-2011
My Carrier: o2

Re: how to take new line

I know but that is what he has asked for. Not sure why  :Wacko:

Please use plain text.
Trusted Contributor
Himanshu_berry
Posts: 138
Registered: ‎04-19-2012
My Carrier: Nokia

Re: how to take new line

all friends ,

                   i know i am new to blackberry and java.

                   thats y i post my problems.

                   coz you most of r good developers.

                   if u can shar your knowledge .

                   i ll good for me to learn new things.

                   if this forum not for beginers .

                   the forum can just throw me . 

Please use plain text.
Developer
simon_hain
Posts: 15,558
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: how to take new line

personally, i would appreciate it if you could use proper English, as a foreign speaker it is difficult for me to read crippled "slang".

In general it is good if you work on your own solution. Giving you the code that does what you require would be easy, but in the end you would require somebody else to write your software as you only copy and paste parts without understanding how they work.

Your initial question was answered correctly in the first post: you use "\n" for a new line, in desktop java as well as j2me/bb java.
It would be the correct thing to mark the thread as solved, not to go ahead and post follow-up questions.

You post about 20 replies within 10 minutes, if you spend this time reviewing some samples or reading the developer guide i am pretty sure we will all come out the better!
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
rabiray
Posts: 141
Registered: ‎07-13-2011
My Carrier: Vodafone

Re: how to take new line

Hi Himanshu

 

Can you please mark my first reply as solved.

If you need any more help open a new thread.

 

Cheers

Rabi Ray

Please use plain text.