I have created a swt table and i don’t know how to display the text in desired font. But i know how to do it in jlabel. I am having problem to add the jlabel to the swt.table.
For jLabel I have done like this :
String theString = "All the King's men";
JLabel theLabel = new JLabel(theString);
java.awt.Font theFont = new java.awt.Font("Helvetica", Font.PLAIN, 10);
theLabel.setFont(theFont);
So how to insert the label text to the table columns?
You can’t mix SWT and AWT in this way. Instead, you should call
TableItem.setFont(Font). Note that it takesorg.eclipse.swt.graphics.Fontand notjava.awt.Font!