En Java: composant Swing
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class Composants extends JFrame
{ public static void main(String args[])
{ new Composants();
}
public Composants() { super("Quelques composants Swing"); JPanel p=new JPanel();
JComboBox colors=new JComboBox();
colors.addItem("blue"); colors.addItem("green"); colors.addItem("red"); p.add(colors);
JList langue=new JList(new String[] {"Français","Anglais","Allemand"}); p.add(langue);
this.getContentPane().add(p);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setSize(300,300);
this.setLocationRelativeTo(null);
this.setVisible(true);
}
}