Solved

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

Posted on 2013-11-19
1
307 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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:
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

911 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

23 Experts available now in Live!

Get 1:1 Help Now