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
Developer
Developer
Posts: 34
Registered: ‎11-02-2009
My Device: Not Specified
Accepted Solution

Set title for new thread

hi guys,

 

i have created a new thread but dont know how to setTitle for it, this is my code:

 

 

public class MyThread extends Thread
	{

		String htmlString = "<html><head></head><body><h1>ABG</h1><dl><dt>Definition</dt></body></html>";    
		public MyThread()
		{

		}
        public void run()
        {
            try 
            {
                
                ByteArrayOutputStream output = new ByteArrayOutputStream();
                Base64OutputStream boutput = new Base64OutputStream( output );
                
                output.write( "data:text/html;base64,".getBytes() );
                boutput.write( htmlString.getBytes() );
                boutput.flush();
                boutput.close();
                output.flush();
                output.close();
                
                BrowserSession bSession = Browser.getDefaultSession();
                bSession.displayPage( output.toString() );              
              
            }
            catch( Exception e ) 
            {
                System.out.println( "Exception: " + e );
            }
        }
	}

 

 

and this is my screen when start new thread:

 

 

Highlighted
Developer
Posts: 562
Registered: ‎09-30-2009
My Device: Not Specified

Re: Set title for new thread

[ Edited ]

Threads don't have titles.

 

If you're referring to your HTML content, why don't you use the title tag and see what happens?