• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Need some help in StyledText.setText()

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

String finalOutput = "";
StringBuffer buffer = new StringBuffer();

StyledText outputArea = new StyledText(outputAreaGroup, SWT.MULTI
| SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
gridData.heightHint = 109;
gridData.widthHint = 755;
outputArea.setLayoutData(gridData);
outputArea.setEditable(false);

After performed some operation I will get large amount of data in a List (result).

List result = comd.getResult();
if (result != null && !result.isEmpty()) {
Iterator iter = result.iterator();
while (iter.hasNext()) {
buffer.append(iter.next());
}
finalOutput = buffer.toString();
}

//Up to here I have no problem.

But when I am trying to execute the outputArea.setText(finalOutput);
Here it takes so much time to set the data in a styled text.
The tool gets hanged for few mins and showing as Not responding in Task manager.

Please let me know how to handle this situation.

Thanks,
 
Just let me do the talking. Ahem ... so ... you see ... we have this tiny ad...
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic