Solved

How to use a new line character for a text of an image in JAVA SWT?

Posted on 2013-11-19
1
306 Views
Last Modified: 2013-11-20
Hi,
I am working on a GUI in Java SWT and I need to write part of the text of an image to a new line.

However, \n and any other html fomratting did not work.

This is the code snippet I have:

item_SaveSelections = new ToolItem(custToolbar_CheckConfiguration.getToolBar(), SWT.PUSH);
item_SaveSelections.setImage(image_floppy_disk); item_SaveSelections.setText("Save selected items"); 

Open in new window



What I want to do is to put a new line character after the word "Save".

Can you please help me with that?

Thanks,
0
Comment
Question by:Tolgar
1 Comment
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
Comment Utility
Unfortunately, the answer is... "It can't be done!"

Can you use a shorter label, eg. Save, and then put more useful information in a tooltip with  item_SaveSelections.setToolTipText("Save all selected items"); ?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now