Create a center-aligned tab stop at 300 pixels from the left margin
import java.util.ArrayList;
import java.util.List;
import javax.swing.text.TabStop;
public class Main {
public static void main(String[] argv) {
List list = new ArrayList();
int pos = 300;
int align = TabStop.ALIGN_CENTER;
int leader = TabStop.LEAD_NONE;
TabStop tstop = new TabStop(pos, align, leader);
list.add(tstop);
}
}
Related examples in the same category