add
Adds an item to this Choice menu. @param item the item to be added @exception NullPointerException if the item's value is equal tonull
Choice
null
258259260261262263264265266267268
b.addItemListener(this); b.setForeground(Color.black); target.setForeground(b.getForeground()); Choice shapes = new Choice(); shapes.addItemListener(this); shapes.addItem("Lines"); shapes.addItem("Points"); shapes.setBackground(Color.lightGray); add(shapes); }
259260261262263264265266267268269
b.setForeground(Color.black); target.setForeground(b.getForeground()); Choice shapes = new Choice(); shapes.addItemListener(this); shapes.addItem("Lines"); shapes.addItem("Points"); shapes.setBackground(Color.lightGray); add(shapes); } @Override
142143144145146147148149150151152
b = new Button("last"); b.addActionListener(this); p.add(b); Choice c = new Choice(); c.addItem("one"); c.addItem("two"); c.addItem("three"); c.addItem("four"); c.addItem("five"); c.addItem("six");
143144145146147148149150151152153
b.addActionListener(this); p.add(b); Choice c = new Choice(); c.addItem("one"); c.addItem("two"); c.addItem("three"); c.addItem("four"); c.addItem("five"); c.addItem("six"); c.addItemListener(this);
144145146147148149150151152153154
p.add(b); Choice c = new Choice(); c.addItem("one"); c.addItem("two"); c.addItem("three"); c.addItem("four"); c.addItem("five"); c.addItem("six"); c.addItemListener(this); p.add(c);
145146147148149150151152153154155
Choice c = new Choice(); c.addItem("one"); c.addItem("two"); c.addItem("three"); c.addItem("four"); c.addItem("five"); c.addItem("six"); c.addItemListener(this); p.add(c); }
146147148149150151152153154155156
147148149150151152153154155156157
c.addItem("one"); c.addItem("two"); c.addItem("three"); c.addItem("four"); c.addItem("five"); c.addItem("six"); c.addItemListener(this); p.add(c); } @Override
7374757677787980818283
//Crée une liste déroulante vierge station = new JComboBox(); //Liste déroulante contenant "semaine" ou "week-end" Choice period = new Choice(); period.addItem("Semaine"); period.addItem("Week-end"); Line tempLine = new Line(); Station tempStation = new Station(); Period tempPeriod = new Period();
7475767778798081828384
station = new JComboBox(); //Liste déroulante contenant "semaine" ou "week-end" Choice period = new Choice(); period.addItem("Semaine"); period.addItem("Week-end"); Line tempLine = new Line(); Station tempStation = new Station(); Period tempPeriod = new Period();