Combobox help

Why when I use the combobox component does it remove focus
from other movieclips?? For instance...I have a button with
onRollOver and onRollOut functions. These work fine, but once I
click on a combobox, they break...and won't work.
I've looked in other places but I haven't found a fix for
this yet. Doing setfocus(this) only puts a ugly yellow highlight
box around my button, and then kills the swf with an infinite loop.
Any ideas?

Your question is very vague and badly phrased. Why don't you post some code to show what you've done and how you're inserting values into the DB right now?
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
(Yes I know it's on JavaRanch but I think it applies everywhere)
----------------------------------------------------------------

Similar Messages

  • Autocomplete ComboBox, Help/ideas!?

    Hi,
    I have to provide a auto-complete ComboBox, and I am looking for a solution.
    The use case:
    I have a collection of country objects, containing the ISO country code.
    However, I don't display the code, but rather the full country (Locale.getDisplayCountry()).
    I use a cellFactory for the drop down listview and a StringConverter for the TextBox.
    I want the user to be able to type e.g. "US" in the text box and the box should automatically select the US country object in the valueProperty.
    If I type only "U", I want the control only to suggest countries in the list view, whose country code starts with "U".
    I started with the ComboBox control in 2.1, but I am stuck.
    I can't access the text box or a key event, which I could use.
    Any help or ideas? Or maybe should I use ComboBoxBase?

    Hi csh,
    For autocomplete control in javafx ,
    This link might be answer for you
    Source Code of AutoFill TextBox Released
    AutoFill TextBox with FilterMode in Javafx 2.0 (Custom Control)
    Thanks,
    Narayan

  • How do you incorporate an ArrayList inside a ComboBox (GUI Project Help)?

    Basically, I created a project around NBA Greats of Our Past. There is around 76 players so rather than typing all of them up in JCreator, how can you use an Arraylist to make things easier. I already created the spreadsheet on Excel with all the names. But the problem is that I don't know how to use them inside my ComboBox.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ComboBoxDemo extends JFrame {
         private String[] nbaGreats = {"Michael Jordan"};
         private ImageIcon[] nbaImage = {
              new ImageIcon("H:/jordan.jpeg")
         private String[] nbaDescription = new String[1];
         private DescriptionPanel descriptionPanel = new DescriptionPanel();
         private JComboBox jcbo = new JComboBox(nbaGreats);
         public static void main(String[] args)
              ComboBoxDemo frame = new ComboBoxDemo();
              frame.pack();
              frame.setTitle("NBA Greats");
              frame.setLocationRelativeTo(null);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setVisible(true);
         public ComboBoxDemo() {
              nbaDescription[0] = "(Included Yet, Description not Included Yet";
              setDisplay(0);
              add(jcbo, BorderLayout.NORTH);
              add(descriptionPanel, BorderLayout.CENTER);
              jcbo.addItemListener(new ItemListener() {
                   public void itemStateChanged(ItemEvent e) {
                        setDisplay(jcbo.getSelectedIndex());
         public void setDisplay(int index) {
              descriptionPanel.setTitle(nbaGreats[index]);
              descriptionPanel.setImageIcon(nbaImage[index]);
              descriptionPanel.setDescription(nbaDescription[index]);
                   I Included a picture for reference. [http://img442.imageshack.us/i/98328443.png/]
    Edited by: lilazndood1 on May 28, 2010 6:50 AM

    Its a working example. The tutorial examplains the code in steps.
    Any code we give you will be no different.
    but it doesn't really help me because I don't understand itIf you have a specific question about the code from the demo then maybe we can help you, but "I don't understand it" is not a question.

  • Help!!!!!!! Extract data from a database to put it in a combobox

    hello
    i have a combobox in wtich a want to put the reseult of the query(select name from departement)
    do so have an idea please

    I'm not an expert but may this could guide you...
    JComboBox jcb = new JComboBox();
    try {
                Statement stmt = dbcon.createStatement();
                String query = "SELECT name FROM clients ORDER BY name ";
                ResultSet rs = stmt.executeQuery(query);
                while (rs.next()) {
                    jcb.addItem(rs.getString("name"));
            } catch (SQLException sqle) {
                System.out.println(sqle.getMessage());
            } catch (Exception e) {
                System.out.println(e.getMessage());
            }I don't remember if you need a Model to work with a JComboBox, but if it's true you will need to make the same operations but working with the model...
    Hope this helps
    <xl>

  • Need help in selecting data dynamically in combobox

    i am taking some values in combobox from database
    and i want that on selection of the option in 1st combobox the another set of values should come in 2nd combobox ,& that also from database
    i have saved the file as .php and also given the database in the zip file, to solve my problem please can anyone help me plz....
    the file link is - http://www.dandylink.com/combotest.zip
    advance thanks for any help.

    .php? Did you see the sign on the door when you came in? If you have some java code you want people to look, where java code is something stored in a .java file, then post it. Or, are you a hacker trying to spread viruses?

  • Help wth combobox scrollbar color

    I'm using Flash 8 and actionscript.
    How do I customize the combobox scrollbar? I've managed to
    change other parts of the combobox but not the combobox scrollbar.
    It would be really cool if I could change the combobox
    scrollbar track color and slider grip thing . . .
    Any help would be greatly appreciated!
    Peace,
    Hondo311
    Here's my actionscript for the combobox:

    scrollTrackColor is a property of the ScrollPane and should
    work, just the same way you already did.
    But not everything is customizable with styles. For many
    things you have to edit the skins.
    The documentation for components could be much better...
    here is how to edit the skin of the scrollpane:
    http://livedocs.macromedia.com/flash/8/main/00004225.html

  • Need help with saving item from combobox to textfile

    Hi all. right now my codes can only save one stock information in the textfile but when I tried to save another stock in the textfile , it overrides the pervious one.
    So I was wondering which part of my codes should be changed??
    DO the following
    Create a fypgui class and put this bunch of codes inside
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.io.BufferedInputStream;
    import java.io.BufferedReader;
    import java.io.DataInputStream;
    import java.io.File;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.URL;
    import java.util.ArrayList;
    import java.util.Scanner;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTabbedPane;
    import javax.swing.JTable;
    public class fypgui {
         private ArrayList<Stock> stockList = new ArrayList<Stock>();
         private String[] stockArray;
         private JComboBox choice1;
         private JTabbedPane tabbedPane = new JTabbedPane();
         private JPanel displayPanel = new JPanel(new GridLayout(5, 1));
         private JButton saveBtn = new JButton("Save");
         private JPanel choicePanel = new JPanel();
         String yahootext;
         String     symbol;
         int index;
         public fypgui() {
              try {
                   //read from text file for stockname
                   File myFile = new File("D:/fyp/savedtext2.txt");
                   FileReader reader = new FileReader(myFile);
                   BufferedReader bufferedReader = new BufferedReader(reader);
                   String line = bufferedReader.readLine();
                   while (line != null) {
                        Stock stock = new Stock();
                        // use delimiter to get name and symbol
                        Scanner scan = new Scanner(line);
                        scan.useDelimiter(",");
                        String name = "";
                        String symbol = "";
                        while (scan.hasNext()) {
                             name += scan.next();
                             symbol += scan.next();
                        stock.setStockName(name);
                        stock.setSymbol(symbol);
                        stockList.add(stock);
                        line = bufferedReader.readLine();
                   //size of the array(stockarray) will be the same as the arraylist(stocklist)
                   stockArray = new String[stockList.size()];
                   for (int i = 0; i < stockList.size(); i++) {
                        stockArray[i] = stockList.get(i).getStockName();
                   //create new combobox
                   choice1 = new JComboBox(stockArray);
                   //For typing stock symbol manually
                   choice1.setEditable(true);
                   //set the combobox as blank
                   choice1.setSelectedIndex(-1);
              } catch (IOException ex) {
                   ex.printStackTrace();
              JFrame frame1 = new JFrame("Stock Ticker");
              frame1.setBounds(200, 200, 300, 300);
              JPanel panel1 = new JPanel();
              panel1.add(choice1);
              choice1.setBounds(20, 35, 260, 20);
              JPanel panel2 = new JPanel();
              JPanel panel5 = new JPanel();
              panel5.add(saveBtn);
              displayPanel.add(panel1);
              displayPanel.add(panel5);
              tabbedPane.addTab("Choice", displayPanel);
              tabbedPane.addTab("Display", choicePanel);
              JLabel label2 = new JLabel("Still in Progress!");
              choicePanel.add(label2);
              frame1.add(tabbedPane);
              frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame1.setVisible(true);
              saveBtn.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        // initalize index as the postion of the stock in the combo box
                        index = choice1.getSelectedIndex();
                        /*if the postion of the combobox is not blank,
                             it will get the StockName and symbol according to the
                             position and download the stock*/
                        if(index != -1){
                             symbol = stockList.get(index).getSymbol();
                             save(symbol);
         @SuppressWarnings("deprecation")
         public void save(String symbol){
              try {
                   String part1 = "http://download.finance.yahoo.com/d/quotes.csv?s=";
                   String part2 = symbol;
                   String part3 = "&f=sl1d1t1c1ohgv&e=.csv";
                   String urlToDownload = part1+part2+part3;
                   URL url = new URL(urlToDownload);
                   //read contents of a website
                   InputStream fromthewebsite = url.openStream(); // throws an IOException
                   //input the data from the website and read the data from the website
                   DataInputStream yahoodata = new DataInputStream(new BufferedInputStream(fromthewebsite));
                   // while there is some contents from the website to read then it will print out the data.
                   while ((yahootext = yahoodata.readLine()) != null) {
                        File newsavefile = new File("D:/fyp/savedtext.txt");
                        try {
                             FileWriter writetosavefile = new FileWriter(newsavefile);
                             writetosavefile.write(yahootext);
                             System.out.println(yahootext);
                             writetosavefile.close();
                        } catch (IOException e) {
                             e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
         public static void main(String[] args) {
              // TODO code application logic here
              new fypgui();
    Create a Stock class a put this bunch of codes inside
    public class Stock {
         String stockName ="";
         String symbol="";
         double lastDone=0.0;
         double change =0.0;
         int volume=0;
         public String getStockName() {
              return stockName;
         public void setStockName(String stockName) {
              this.stockName = stockName;
         public String getSymbol() {
              return symbol;
         public void setSymbol(String symbol) {
              this.symbol = symbol;
         public double getLastDone() {
              return lastDone;
         public void setLastDone(double lastDone) {
              this.lastDone = lastDone;
         public double getChange() {
              return change;
         public void setChange(double change) {
              this.change = change;
         public int getVolume() {
              return volume;
         public void setVolume(int volume) {
              this.volume = volume;
    Create a folder called fyp in D drive and create two txt file in it.
    -savedtext.txt
    -savedtext2.txt
    in the saved savedtext2.txt add
    A ,AXP
    B ,B58.SI
    C ,CLQ10.NYM
    this is my whole application. if you guys can tell me what can I do to make sure that the stock info doesn't overrides . I will more than thankful.
    Edited by: javarookie123 on Jul 9, 2010 9:49 PM

    javarookie123 wrote:
    Hi all. right now my codes can only save one stock information in the textfile but when I tried to save another stock in the textfile , it overrides.. 'over writes'
    ..the pervious one.
    So I was wondering which part of my codes should be changed??Did not look at the code closely, but I am guessing the problem lies in the instantiation of the FileWriter. Try [this constructor|http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/io/FileWriter.html#FileWriter(java.io.File,%20boolean)] (<- link). The documentation is a wonderful thing. ;-)
    And generally on the subject of getting help:
    - There is no need for two question marks. One '?' means a question, while 2 or more typically means a dweeb.
    - Do your best to [write well|http://catb.org/esr/faqs/smart-questions.html#writewell] (<- link). Each sentence should start with an upper case letter. Not just the first one.
    Also, when posting code, code snippets, XML/HTML or input/output, please use the code tags. The code tags protect the indentation and formatting of the sample. To use the code tags, select the sample and click the CODE button.

  • Help combine textbox and combobox

    help, how to making combobox that put forward item with the reference input char
    example: if i input "A"
    so combobox will show item-item with the beginning letter "A"

    {color:0000ff}http://catb.org/~esr/faqs/smart-questions.html
    mindprod.com/jgloss/sscce.html{color}
    db

  • Please help! How to add a combobox on a jtable

    Hi, I have seen on google and here many codes to add a combobox in a jtable but none of them seem to work, I need the urgently.
    My problem is that I must add a comboBox or a JComboBox to a cell inside a JTable on a predefined column. It means that on the column 2 I must add diferent comboboxes for eac row. How can I do it, please help.

    The celleditor is the component shown and the cellrenderer is the first render of a component in the cell and dont have to be the same jcombo box?
    The code on ther post does this:?
    returning a diferent combobox for all the cells on the column depending on the row selected, but as long as only one cell can be selected at a time it seems to hace different jcomboboxes added a time?
    Is there anyway to render any combobox with different values, my program must let the user chose the teacher it want to teach a definen subject, so the combo must have the teacher of a subject loaded on a database, the combos are not constants. I guess I can manage to use the way you showed me, but is there anyway to render a combo just by adding it to a cell! maybe doing changes to the tablemodel or things like that?

  • Help with combobox event handling

    hey techies
    does knw any1 tutorial or where any URL which helps me adding event handling to combobox
    iam new at event handling
    i tried
    jc1.addItemListener(this);
    public void itemStateChanged(ItemEvent event)
              if(event.getSource()==jc1)
              System.out.println("hello");
         }is this way correct to specify event handling in combobox
    i tired this iam getting NPE like this
    Exception in thread "main" java.lang.NullPointerException
    at FinalMobile.<init>(FinalMobile.java:213)
    at FinalMobile.main(FinalMobile.java:740)
    plz jst let me knw and dnt tell me to refer swing tutorial i have been reffering it
    any help is appreciated

    does knw any1 tutorial or where any URL which helps me adding event handling to comboboxExcuse me, I've told you at least 4 times now to download and read the Swing tutorial which has all this information with working examples. I even provided you with the download link.
    How do you have the nerve to say you can't find any tutorial?

  • AIR Window cannot contain MenuBar's or ComboBox's (popups)? HELP!

    Hello all,
    Trying to use an AIR Window instance to show some content. Apparently, an AIR window cannot display pop-up content. In trying to add a child menubar (mx.controls.MenuBar instance) to the window, the menuBar simply fails to be displayed. Checking the parent, etc, shows that the menuBar IS the child of the window, it is visible, and has dimensions that should be shown. It simply does not show up in the window. Also, a combo-box is messed up. The button to drop-down the list does not appear, and so i can't get the drop-down box to show up. Why? This is madness.
    I suppose i might use a nativeMenu for the Window (assuming/hoping it will work) rather than the flex MenuBar, but what about ComboBox's. Can't use a combo-box in the window? Now wondering how other content may have problems (context-menus, other popups).
    Has there been any docs on this sort of thing. Couldn't find anything specifically for this type of error.
    Basically, Window's are somewhat useless if this is the standard behavior.
    Using FlashBuilder 4.Halo. Flex. Standard stuff. NO spark.
    Thanks much for any help!

    Yeah same problem here. Restarting helps, but I **** well am not going to restart with all of my opened emails and applications. Apple has lost a lot of money due to this issue over the last few days, as have the artists. These guys should take off their turtlenecks and put some proper QA into their product releases. Two Apple products that do not work together is pretty pathetic.
    Seriously thinking about going back to PC...

  • Help with ComboBox Selection Update

    Hello,
    I am trying to make this application display all its labels in a different language depending on which locale the user picks from the ComboBox. The variables are being read from the ResourceBundles correctly (see command-line debugging statements) but I cannot get the pane to 'refresh' when the item is selected. I've tried everything I can think of! Please help! :)
    (This assignment was to internationalize a program we wrote for a previous assignment, so this program wasn't originally written to do this. I am trying to add this functionality to my existing project, so it's not ideal).
    Thank you for any advice, help or hints you can give!
    Program(PrjGUI)
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    import javax.swing.*;
    import java.text.DateFormat;
    import java.util.Calendar;
    import java.util.GregorianCalendar;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import java.util.TimeZone;
    public class PrjGUI extends JFrame
       //**** Instance Variables for both classes
       private JRadioButton optGram, optOz;
       private JTextField txtWeightEnter, txtResult, txtDateTime;
       private JButton cmdConvert;
       private JComboBox comboSelectLocale;
            //arrays--one for combo box list, and the other for values to use when a particular list item is selected
       private String[] localeList = {"English, USA", "Fran\u00E7ais, France", "Espag\u00F1ol, M\u00E9xico"};
       private Locale[] localeCode = {(new Locale("en", "US")), (new Locale("fr", "FR")), (new Locale("es", "MX"))};
       private JLabel lblChoose, lblWeightEnter;
       protected String titleTxt, enterTxt, btnTxt, gramTxt, ozTxt, resultDisplayTxt, localeTimeZone, dateFormat;
       protected ResourceBundle res;
       protected Locale currentLocale;
       //declare Handler Object
       private CmdConvertWeight convertWeight;
       //**************main method******************
       public static void main(String[] args)
          PrjGUI convertWeight1 = new PrjGUI();
       }//end of main******************************
       //constructor
       public PrjGUI()
          //create panel for components
          Container pane = getContentPane();
          //set the layout
          pane.setLayout(new GridLayout(0, 1, 5, 5));
          //set the color
          pane.setBackground(Color.GREEN);
          //make a font to use in components
          Font font1 = new Font("SansSerif", Font.BOLD, 16);
          /**New calendar object to display the date and time*/
          GregorianCalendar calendar = new GregorianCalendar();
          DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL, Locale.US);
          /**currentLocale = localeCode[comboSelectLocale.getSelectedIndex()];
          DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL, currentLocale); //uses key for ResourceBundle*/
          TimeZone timeZone = TimeZone.getTimeZone("CST");
          //TimeZone timeZone = TimeZone.getTimeZone(localeTimeZone); //uses key for resourceBundle
          formatter.setTimeZone(timeZone);
          //***create UI objects***
          /**NEW OBJECTS FOR prjInternational:
           * a drop-down combobox, a label, and a txt field
          txtDateTime = new JTextField(formatter.format(calendar.getTime()));
          //txtDateTime = formatter.format(calendar.getTime());
          lblChoose = new JLabel("Please choose your language.");
          lblChoose.setFont(font1);
          lblChoose.setBackground(new Color(0, 212, 255)); //aqua blue
          comboSelectLocale = new JComboBox(localeList);
          comboSelectLocale.setFont(font1);
          comboSelectLocale.setBackground(new Color(0, 212, 255)); //aqua blue
          //comboSelectLocale.setSelectedIndex(0);
          //add a listener to the combo box to get the selected item
          /**default values for variables so I can debug--at the moment
           * I can't get the resouceBundle to work--it can't locate the
           * file.  So I will hard code these in for now.
          /*titleTxt="Food Weight Converter";
          enterTxt="Please enter the Weight you wish to convert.";
          btnTxt="Convert this weight!";
          gramTxt="grams";
          ozTxt="oz";
          resultDisplayTxt="Result will display here.";*/
          comboSelectLocale.addItemListener(new ItemListener()
               public void itemStateChanged(ItemEvent e)
                    res = setCurrentLocale(comboSelectLocale.getSelectedIndex());
                    System.out.println(res.getString("enterTxt"));
                    updateItems(res);
                  //set variables from Resource Bundle
                  /* titleTxt = res.getString("titleTxt");
                   System.out.println(res.getString("enterTxt")); //debug
                   enterTxt = res.getString("enterTxt");
                   btnTxt = res.getString("enterTxt");
                   gramTxt = res.getString("gramTxt");
                   ozTxt = res.getString("ozTxt");
                   resultDisplayTxt = res.getString("resultDisplayTxt");*/
          //2 radio buttons
          //optGram = new JRadioButton("grams", true);
          optGram = new JRadioButton(gramTxt, true);
          //optOz = new JRadioButton("oz.");
          optOz = new JRadioButton(ozTxt);
          optGram.setBackground(Color.GREEN);
          optGram.setFont(font1);
          optOz.setBackground(Color.GREEN);
          optOz.setFont(font1);
          //button group so only one can be chosen
          ButtonGroup weightUnit = new ButtonGroup();
          weightUnit.add(optGram);
          weightUnit.add(optOz);
          //label and text field for weight
          //JLabel lblWeightEnter = new JLabel("Please enter the weight you wish to convert:");
          JLabel lblWeightEnter = new JLabel(enterTxt);
          lblWeightEnter.setFont(font1);
          txtWeightEnter = new JTextField("20.05", 6);
          txtWeightEnter.setBackground(new Color(205, 255, 0)); //lime green
          txtWeightEnter.setFont(font1);
          //button to make conversion
          //cmdConvert = new JButton("Convert this weight!");
          cmdConvert = new JButton(btnTxt);
          cmdConvert.setFont(font1);
          //textfield to display result
          //txtResult = new JTextField("Result will display here");
          txtResult = new JTextField(resultDisplayTxt);
          txtResult.setBackground(new Color(205, 255, 0)); //lime green
          txtResult.setFont(font1);
          //register the handler
          convertWeight = new CmdConvertWeight();
          cmdConvert.addActionListener(convertWeight);
          //add content to pane
          pane.add(txtDateTime);
          pane.add(lblChoose);
          pane.add(comboSelectLocale);
          pane.add(lblWeightEnter);
          pane.add(txtWeightEnter);
          pane.add(optGram);
          pane.add(optOz);
          pane.add(cmdConvert);
          pane.add(txtResult);
          //create window for object
          setTitle(titleTxt);
          setSize(400, 300);
          setVisible(true);
          setLocationRelativeTo(null);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
       }//end of constructor
       /**  ACTION LISTENER CLASS TO RESPOND TO USER'S INPUT (EVENTS) **/
       private class CmdConvertWeight implements ActionListener
          public void actionPerformed(ActionEvent e)
             //System.out.println("we made it to the Action Listener"); //debug
             //get info from fields
             double weight = Double.parseDouble(txtWeightEnter.getText());
             double weightConvert = 0;
             String weightConvertString;
             if (optGram.isSelected())//if user's weight is in grams, converting to oz
             weightConvert = weight/28.35;
             weightConvertString = Double.toString(weightConvert);
             txtResult.setText(txtWeightEnter.getText() + " grams is equal to " + weightConvertString + " oz.");
             }//end if gram select
             else if (optOz.isSelected())//if user's weight is in oz, converting to grams
             weightConvert = weight*28.35;
             weightConvertString = Double.toString(weightConvert);
             txtResult.setText(txtWeightEnter.getText() + " oz. is equal to " + weightConvertString + " grams.");
             }//end if oz select
         }//end actionPerformed
      }//end CmdConvertWeight
       /**setCurrentLocale method from combo box listener*/
       public ResourceBundle setCurrentLocale(int index)
            Locale currentLocale = localeCode[index];
            System.out.println(currentLocale); //debug
            System.out.println("MyResource_" + currentLocale); //debug
            ResourceBundle res = ResourceBundle.getBundle("MyResource_" + currentLocale);
            return res;
       }//end setCurrentLocale
       public void updateItems(ResourceBundle res)
            //convertWeight1.setTitle(res.getString(titleTxt));
            System.out.println(res.getString(btnTxt));//debug
            lblWeightEnter.setText(res.getString(enterTxt));
            optGram.setText(res.getString(gramTxt));
            optOz.setText(res.getString(ozTxt));
            cmdConvert.setText(res.getString(btnTxt));
            txtResult.setText(res.getString(resultDisplayTxt));
       }//end updateItems
    }//end of class PrjGUIResourceBundles(each in a different file)
    public class MyResource_fr_FR extends java.util.ListResourceBundle
         static final Object[][] contents =
              {"titleTxt", "Convertisseur de poids de nourriture"},
              {"enterTxt", "Veuillez \u00E9crire le poids que vous souhaitez convertir."},
              {"btnTxt", "Convertissez ce poids!"},
              {"gramTxt", "grammes"},
              {"ozTxt", "onces"},
              {"resultDisplayTxt", "Le r\u00E9sultat montrera ici."},
              {"localeTimeZone", "CET"},
              {"dateFormat", "Locale.FR"}
         public Object[][] getContents()
              return contents;
    public class MyResource_es_MX extends java.util.ListResourceBundle
         static final Object[][] contents =
              {"titleTxt", "Convertidor del peso del alimento"},
              {"enterTxt", "Incorpore por favor el peso que usted desea convertir."},
              {"btnTxt", "\u00F1convierta este peso!"},
              {"gramTxt", "gramos"},
              {"ozTxt", "onzas"},
              {"resultDisplayTxt", "El resultado exhibir\u00E1 aqu\u00ED."},
              {"localeTimeZone", "CST"},
              {"dateFormat", "Locale.MX"}     
         public Object[][] getContents()
              return contents;
    public class MyResource_en_US extends java.util.ListResourceBundle
         static final Object[][] contents =
              {"titleTxt", "Food Weight Converter"},
              {"enterTxt", "Please enter the weight you wish to convert."},
              {"btnTxt", "Convert this weight!"},
              {"gramTxt", "grams"},
              {"ozTxt", "oz"},
              {"resultDisplayTxt", "Result will display here."},
              {"localeTimeZone", "CST"},
              {"dateFormat", "Locale.US"}
         public Object[][] getContents()
              return contents;
    }Edited by: JessePhoenix on Nov 2, 2008 8:30 PM

    catman2u wrote:
    does anyone from Lenovo actually read this forum?
    From the Communiy Rules in the Welcome section....
     Objectives of Lenovo Discussion Forums
    These communities have been created to provide a high quality atmosphere in which users of Lenovo products and services may share experiences and expertise. While members from Lenovo may participate at intervals to engage in the discussions and offer advice and suggestions, this forum is not designed as a dedicated and staffed support channel. This is an informal and public forum, and Lenovo does not guarantee the accuracy of information and advice posted here -- see important Warranty information below.
    No amount of ranting is going to get you anything more than you will achieve with a clear exposition of your issue... so you might want to try doing that instead of ranting and assuming that everyone already knows what you know etc etc.
    Cheers,
    Bill
    I don't work for Lenovo

  • Help with ComboBox, datasource from database

    Hi there,
    i am new to Flex technology and desperately need help with
    combobox.
    I have a combobox in my app and the datasource comes from
    MySQL database. I use a PHP script to populate the combobox. Say in
    the datatabse table, I have the following result:
    id name
    1 dog
    2 cat
    3 horse
    In the app, the combobox will have the list as the name of
    the animals: dog, cat, horse. But when the user selects dog, how do
    I get the selected id 1 instead of the label "dog".
    Any help/suggestion will be appreciated.

    Hi again,
    the xml for the combobox datasource is as follows
    <animals>
    <animal>
    <id>1</id>
    <name>dog</name>
    </animal>
    <animal>
    <id>2</id>
    <name>cat</name>
    </animal>
    <animal>
    <id>3</id>
    <name>horse</name>
    </animal>
    </animals>
    and my <mx:HTTPService> is:
    <mx:HTTPService id="dropDown" useProxy="false" url="
    http://localhost/~ronnyk/combobox.php"
    resultFormat="e4x" result="get_drop_down(event)" />
    public function get_drop_down(e:ResultEvent):void{
    var dropArr:XML = e.result as XML;
    cb.dataProvider = dropArr.animal;
    cb.labelField = "name";
    cb.data = "id";
    public function clickme():void{
    txtinput.text = cb.selectedItem as String;
    I can't figure out which part I did wrong, in order to get
    the id instead of the name when the user clicks the button

  • Help with Comboboxes inside a repeater

    Hi, I have a problem that I really need some help, if anyone knows how to do it.
    I have to make in flex a dynamic form that has X questions and each question can be answered 3 times by sellecting Y options in a combobox. As you can Imagine the number of questions and answers can change.
    Something like this:
    QUESTION                          FIRST ANSWER   2nd ANSWER      3rd ANSWER
    1- Which option do you like?  Combobox: A      Combobox: C        CB: A
    2- Second Question?             Combobox: B      Combobox: C        CB: D
    3- Third Question?                 Combobox: A      Combobox: Blank  CB: B
    (CB: means Combobox - I just made it shorter so it could fit the window)
    I managed to correctly using a repeater show all the questions and each combobox has all the right options inside. All I want now is to get the data from those comboboxes.
    This is a Simplified code (I removed all the non-essencial stuff) so you can get an idea:
    <mx:Repeater id="rp">
    <mx:VBox label="{rp.currentItem.nome}"
    width="100%">
    <mx:Repeater id="qt"
    dataProvider="{rp.currentItem.tbdavaliacao_pergunta}">
    <mx:HBox width="100%"
    verticalAlign="middle"
    horizontalAlign="center">
    <!-- This is the question text -->
    <mx:Text text="{String(qt.currentItem.nome)}"
    textAlign="center"/>
    <!-- Next, are the 3 comboboxes that are repeated X times -->
                                            <mx:ComboBox dataProvider="{grau}"
                                                           id="auto"
                                                           textAlign="center">
                                             </mx:ComboBox>
                                            <mx:ComboBox dataProvider="{grau}"
                                                           id="superior"
                                                           textAlign="center">
                                            </mx:ComboBox>
                                            <mx:ComboBox dataProvider="{grau}"
                                                           id="resultado"
                                                           textAlign="center">
                                            </mx:ComboBox>
    </mx:HBox>
    </mx:Repeater>
    </mx:VBox>
    </mx:Repeater>
    Anyone has an idea of how can I get all the answers from all my dynamic comboboxes?
    The perfect AND ideal solution would be having X Dynamic objects with the question id + the combobox id storing the answer sellected.
    So I would know that the question 32 has the answers A, B and A for an example.
    qt.currentitem.id + combobox.id = selectedLabel
    (question ID) + (combobox id) = (selectedLabel)
    32auto = 'A'
    32superior = 'B'
    32resultado = 'A'
    Or just one arraycollection with all the answers...
    At this point, I would accept any answer or idea or sollution...
    Thanks a lot!!

    I've looked at the HR schema to provide an example
    From the EMPLOYEES table I would like to return the EMPLOYEE_IDs of the employees with the highest SALARY per JOB_ID. When considering the employees that have the same JOB_ID, if any of the employees have a MANAGER_ID of x then no employee is returned for that group of employees with the same JOB_ID. x will be passed in as a parameter to my procedure.
    Example
    MANAGER_ID of 99 passed in
    All of the EMPLOYEE_IDs with the max SALARY per JOB_ID returned - no one has a manager with MANAGER_ID of 99
    MANAGER_ID of 101 passed in
    101 returned - Neena has the max salary of all the AD_VPs and neither of the AD_VPs has a MANAGER_ID of 101 (ok I know this isn't true about the salary!)
    102 returned - Alexander has the max salary of all IT_PROGs and none of them has MANAGER_ID of 101
    (108 not returned as Nancy has MANAGER_ID of 101)
    109 returned - Daniel has the max salary of all the FI_ACCOUNTs and none of them has MANAGER_ID of 101
    etc... for all JOB_IDs
    MANAGER_ID of 102 passed in
    101 returned - Neena has the max salary of all the AD_VPs and neither of the AD_VPs has a MANAGER_ID of 102 (ok I know this isn't true about the salary!)
    (no IT_PROGs returned as Alexander has MANAGER_ID of 102)
    108 returned - Nancy has max SALARY and not a MANAGER_ID of 102
    109 returned - Daniel has the max salary of all the FI_ACCOUNTs and none of them has MANAGER_ID of 102
    etc... for all JOB_IDs
    MANAGER_ID of 103 passed in
    101 returned - Neena has the max salary of all the AD_VPs and neither of the AD_VPs has a MANAGER_ID of 103 (ok I know this isn't true about the salary!)
    (no IT_PROGs returned as several have MANAGER_ID of 103)
    108 returned - Nancy has max SALARY and not a MANAGER_ID of 103
    109 returned - Daniel has the max salary of all the FI_ACCOUNTs and none of them has MANAGER_ID of 103
    etc... for all JOB_IDs
    Hope this helps to explain things, and thanks to anyone that can help
    Rob

  • ComboBox (dropdown) Need Help Adding URL links!!!

    I am somewhat of a newbie....Anybody know how to use URL
    links in a ComboBox dropdown menu? NEED HELP!!!!!!! I'm trying to
    make it so that after selecting an option, the user is directed to
    another URL within the same browser window. Using flash 8!
    Thanks,

    Im a bit a newbie myslef but i think you make flash
    commuincate to javascript wich will make the browser goto the URL.
    do a search on getURL and javascript together and i am sure
    you will find something.
    And when slecting to redirct i think its on?(onPress)
    something so maybe look throught the help section in flash 8 and
    look at componets. I think there is some actionscript help there.
    Sorry i could not be more helpful.

Maybe you are looking for