View Single Post
  #2 (permalink)  
Old 01-21-2008, 01:27 AM
Mark_Petrov Mark_Petrov is offline
Member
 
Join Date: Jan 2008
Posts: 3
Mark_Petrov is on a distinguished road
/* Create a combo box and a descriptive label */
fontStylePrompt = new JLabel("Select a font for your resume: ");
fontStylePrompt.setAlignmentX(JLabel.CENTER_ALIGNM ENT);
content.add(fontStylePrompt);

String[] fonts = {"Times New Roman", "Ariel"}
fontStyle = new JComboBox(fonts);
fontStyle.setAlignmentX(JComboBox.CENTER_ALIGNMENT );
fontStyle.setSelectIndex(0);
fontStyle.addActionListener(this);
content.add(fontStyle);

here a small snipet of code for the JComboBox that will help you
Reply With Quote