コード例 #1
0
  public AnimationStepPanel(AppD app) {
    kernel = app.getKernel();

    // text field for animation step
    label = new JLabel();
    tfAnimStep = new AngleTextField(6, app);
    label.setLabelFor(tfAnimStep);
    tfAnimStep.addActionListener(this);
    tfAnimStep.addFocusListener(this);

    // put it all together
    JPanel animPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    animPanel.add(label);
    animPanel.add(tfAnimStep);

    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    animPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
    add(animPanel);

    setLabels();
  }