1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
//*************** Les attributs *****************
JPanel pnlRecoFV = new JPanel() ;
JLabel recoFVInstrumentLbl = new JLabel() ;
JLabel recommendationLbl = new JLabel() ;
JComboBox RecommendationBox = new JComboBox() ;
JLabel FairValueLbl = new JLabel() ;
JComboBox FairValueBox = new JComboBox() ;
JTextField FairValueText = new JTextField() ;
/************** Le constructeur *****************
pnlRecoFV.setLayout(new GridBagLayout());
BoxLayout.X_AXIS));
m_InstrumentRecoFVInstrumentPanel = new InstrumentFVPanel();
pnlReco.setLayout(new BoxLayout(pnlReco, BoxLayout.X_AXIS));
pnlFV.setLayout(new BoxLayout(pnlFV, BoxLayout.X_AXIS));
pnlButtonsRecoFV.setLayout(new BoxLayout(pnlButtonsRecoFV, BoxLayout.Y_AXIS));
JPanel pnlReco = new JPanel() ;
JPanel pnlFV = new JPanel() ;
JButton addButton = new JButton("Add") ;
JButton cancelButton = new JButton("Cancel") ;
JPanel pnlButtonsRecoFV = new JPanel() ;
recoFVInstrumentLbl.setText("Instrument: ");
recommendationLbl.setHorizontalAlignment(SwingConstants.LEFT);
recommendationLbl.setText("Recommendation :");
FairValueLbl.setText("Fair value: ");
FairValueLbl.setHorizontalAlignment(SwingConstants.LEFT);
RecommendationBox.setMaximumSize(new Dimension(150, 22));
RecommendationBox.setMinimumSize(new Dimension(150, 22));
RecommendationBox.setPreferredSize(new Dimension(150, 22));
pnlReco.setBorder(
BorderFactory.createCompoundBorder(
BorderFactory.createTitledBorder("Add a new recommendation"),
BorderFactory.createEmptyBorder(10,10,10,10)));
pnlReco.setLayout(flowLayout1);
flowLayout1.setAlignment(FlowLayout.LEFT);
pnlReco.add(recommendationLbl, null);
pnlReco.add(RecommendationBox, null);
FairValueBox.setMaximumSize(new Dimension(150, 22));
FairValueBox.setMinimumSize(new Dimension(150, 22));
FairValueBox.setPreferredSize(new Dimension(150, 22));
FairValueText.setMaximumSize(new Dimension(150, 22));
FairValueText.setMinimumSize(new Dimension(150, 22));
FairValueText.setPreferredSize(new Dimension(150, 22));
pnlFV.setBorder(
BorderFactory.createCompoundBorder(
BorderFactory.createTitledBorder("Add a new fair value"),
BorderFactory.createEmptyBorder(10,10,10,10)));
FlowLayout flowLayout1 = new FlowLayout() ;
pnlFV.setLayout(flowLayout1);
flowLayout10.setAlignment(FlowLayout.LEFT);
pnlFV.add(FairValueLbl, null);
pnlFV.add(FairValueBox, null);
pnlFV.add(FairValueText, null);
pnlButtonsRecoFV.add(addButton);
pnlButtonsRecoFV.add(cancelButton);
pnlRecoFV.add(m_InstrumentRecoFVInstrumentPanel, new GridBagConstraints(0, 0, 3, 1, 1.0, 0.0
,GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
pnlRecoFV.add(pnlReco, new GridBagConstraints(0, 1, 3, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
pnlRecoFV.add(pnlFV, new GridBagConstraints(0, 2, 3, 1, 0.0, 0.0
,GridBagConstraints.SOUTH, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
pnlRecoFV.add(pnlButtonsRecoFV, new GridBagConstraints(5, 0, 1, 5, 0.0, 1.0
,GridBagConstraints.NORTH, GridBagConstraints.VERTICAL, new Insets(5, 5, 5, 5), 0, 0));
tabCompany.addTab("Recommendation & Fair Value", pnlRecoFV) ; |
Partager