List of usage examples for org.jfree.ui Spinner Spinner
public Spinner(final int value)
From source file:org.jfree.chart.demo.DrawStringDemo.java
private JPanel createTab2Content() { JPanel jpanel = new JPanel(new BorderLayout()); JPanel jpanel1 = new JPanel(); jpanel1.add(new JLabel("Text anchor: ")); combo2 = new JComboBox(); populateTextAnchorCombo(combo2);/*w w w . j a v a2 s . c om*/ combo2.setActionCommand("combo2.changed"); combo2.addActionListener(this); jpanel1.add(combo2); jpanel1.add(new JLabel("Rotation anchor: ")); combo3 = new JComboBox(); populateTextAnchorCombo(combo3); combo3.setActionCommand("combo3.changed"); combo3.addActionListener(this); jpanel1.add(combo3); spinner = new Spinner(0); spinner.addPropertyChangeListener(this); jpanel1.add(spinner); jpanel.add(jpanel1, "North"); drawStringPanel2 = new DrawStringPanel("Rotated Text", true); jpanel.add(drawStringPanel2); return jpanel; }
From source file:org.jfree.demo.DrawStringDemo.java
/** * Creates the content for tab 2./* w w w. j av a 2s . co m*/ * * @return The content panel. */ private JPanel createTab2Content() { final JPanel content = new JPanel(new BorderLayout()); final JPanel controls = new JPanel(); controls.add(new JLabel("Text anchor: ")); this.combo2 = new JComboBox(); populateTextAnchorCombo(this.combo2); this.combo2.setActionCommand("combo2.changed"); this.combo2.addActionListener(this); controls.add(this.combo2); controls.add(new JLabel("Rotation anchor: ")); this.combo3 = new JComboBox(); populateTextAnchorCombo(this.combo3); this.combo3.setActionCommand("combo3.changed"); this.combo3.addActionListener(this); controls.add(this.combo3); this.spinner = new Spinner(0); this.spinner.addPropertyChangeListener(this); controls.add(this.spinner); content.add(controls, BorderLayout.NORTH); this.drawStringPanel2 = new DrawStringPanel("Rotated Text", true); content.add(this.drawStringPanel2); return content; }