ok so use the textbox class, you may have to import:
import java.lang.Object.*;
in first line of code
next we need to draw the textbox and fill it with text:
Textbox textybox = new Textbox("text goes here");
ok we now need to use a new class to rotate it:
public VTextIcon(Component component, String label) {
this(component, label, ROTATE_DEFAULT);
}
public VTextIcon(Component component, String label,
int rotateHint) {
fComponent = component;
fLabel = label;
fRotation = verifyRotation(label, rotateHint);
calcDimensions();
fComponent.addPropertyChangeListener(this);
}
public void setLabel(String label) {
fLabel = label;
// Make sure the current rotation is still legal
fRotation = verifyRotation(label, fRotation);
recalcDimensions();
}
//you need to create a new panel here named "panel"
VTextIcon textIcon = new VTextIcon(panel, "text goes here");