Package

Source Code of test

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;

import composants.JLabeledSpinnerNumber;
import composants.JLabledNumericTextField;
import composants.JLabledTextField;
import composants.JMessageBox;
import composants.JSelectFile;
import composants.JSelectFile.FILTRE;

public class test {

  /**
   * @param args
   */
  public static void main(String[] args) {
    final JFrame f = new JFrame("test");
    f.setSize(200, 200);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JLabledTextField ltf = new JLabledTextField("izlan :");

    final JLabledNumericTextField lntf = new JLabledNumericTextField(
        "Tapez votre nombre");
    ltf.setText("premier test");
    // f.add(ltf);

    final JLabeledSpinnerNumber tn = new JLabeledSpinnerNumber("numero :",
        1, 10, 5, 1);
    f.add("North", tn);// ("North",tn);
    JButton b = new JButton("Click");

    b.addActionListener(new ActionListener() {

      public void actionPerformed(ActionEvent e) {

        double s = JMessageBox.SaisieNombre("tapez votre num",
            "test Jtext");
        System.out.println(s);

      }
    });

    JSelectFile sf = JSelectFile.getInstance();
    sf.setFiltreWithPreview(FILTRE.ALL);

    f.add("Center", sf);
    f.add("South", b);
    f.setVisible(true);

  }

}
TOP

Related Classes of test

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.