3 public class OriginView
extends JPanel
{
4 private Origin originObj
;
6 private JComboBox
<String
> comboBox
;
7 //FIXME: this label should be refreshed on country selection.
8 private JLabel continentLabel
;
10 OriginView(Origin originObj
) {
11 setOriginObj(originObj
);
12 this.label
= new JLabel();
13 this.label
.setText("Origin");
14 this.comboBox
= new JComboBox
<>(this.getOriginObj().getCountriesArray());
15 this.comboBox
.setSelectedItem(this.getOriginObj().getCountry());
16 this.continentLabel
= new JLabel();
17 this.continentLabel
.setText("(" + this.getOriginObj().getContinent() + ")");
23 public Origin
getOriginObj() {
27 public void setOriginObj(Origin originObj
) {
28 this.originObj
= originObj
;