?
Solved

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

Posted on 2013-11-19
1
Medium Priority
?
321 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 36

Accepted Solution

by:
mccarl earned 2000 total points
ID: 39661114
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 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