Combo Box in a JTable not appearing

Hi Swing,
I have a snippet of code that I took from the Swing guide for JTables that adds a JComboBox into the 3rd column in the table. However, the ComboBox doesnt appear?
Can anyone see what is going wrong? Code is below:- I can post more if needed:-
     public void addTable() {
          tableModel = new MyTableModel(rows,columns);
          relationTable = new JTable(tableModel);
       //Set up the editor for the sport cells.
        TableColumn sportColumn = table.getColumnModel().getColumn(2);                                              
        JComboBox allStaff = new JComboBox();
        allStaff.addItem("Snowboarding");
        allStaff.addItem("Rowing");
        allStaff.addItem("Knitting");
        allStaff.addItem("Speed reading");
        allStaff.addItem("Pool");
        allStaff.addItem("None of the above");
        sportColumn.setCellEditor(new DefaultCellEditor(allStaff));
          // set so only one row can be selected at once
          relationTable.setAutoResizeMode( JTable.AUTO_RESIZE_OFF );
          relationTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
          // add to pane:-
          JScrollPane scrollPane3 = new JScrollPane(relationTable);
          scrollPane3.setBounds(X,Y,Z,W);
          getContentPane().add(scrollPane3 );
     }Cheers

hi
look I will give u a simple code I created based on your combo box
enjoy (:
import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
public class TablCo extends JPanel {
static JFrame frame;
JTable table;
DefaultTableModel tm;
public TablCo() {
super(new BorderLayout());
JPanel leftPanel = createVerticalBoxPanel();
//Create a table model.
tm = new DefaultTableModel();
tm.addColumn("Column 0");
tm.addColumn("Column 1");
tm.addColumn("Column 2");
tm.addColumn("Column 3");
tm.addRow(new String[]{"01", "02", "03", "Snowboarding"});
tm.addRow(new String[]{"04 ", "05", "06", "Snowboarding"});
tm.addRow(new String[]{"07", "08", "09", "Snowboarding"});
tm.addRow(new String[]{"10", "11", "12", "Snowboarding"});
//Use the table model to create a table.
table = new JTable(tm);
          //insert a combo box in table
          TableColumn sportColumn = table.getColumnModel().getColumn(3);
          JComboBox allStaff = new JComboBox();
               allStaff.addItem("Snowboarding");
               allStaff.addItem("Rowing");
               allStaff.addItem("Knitting");
               allStaff.addItem("Speed reading");
               allStaff.addItem("Pool");
               allStaff.addItem("None of the above");
          //DefaultCellEditor dce = new DefaultCellEditor(allStaff);
          sportColumn.setCellEditor(new DefaultCellEditor(allStaff));
          JScrollPane tableView = new JScrollPane(table);
tableView.setPreferredSize(new Dimension(300, 100));
          leftPanel.add(createPanelForComponent(tableView, "JTable"));
          JFrame.setDefaultLookAndFeelDecorated(true);
          //Create and set up the window.
          frame = new JFrame("BasicDnD");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          //Create and set up the content pane.
          frame.setContentPane(leftPanel);
          //Display the window.
          frame.pack();
          frame.setVisible(true);
          protected JPanel createVerticalBoxPanel() {
          JPanel p = new JPanel();
          p.setLayout(new BoxLayout(p, BoxLayout.PAGE_AXIS));
          p.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
          return p;
          public JPanel createPanelForComponent(JComponent comp,
          String title) {
          JPanel panel = new JPanel(new BorderLayout());
          panel.add(comp, BorderLayout.CENTER);
          if (title != null) {
          panel.setBorder(BorderFactory.createTitledBorder(title));
          return panel;
public static void main(String[] args) {
     new TablCo();
}

Similar Messages

  • Editable Combo box in a JTable

    Hi,
    Is it possible to have an editable combo Box in a JTable with an item Listener attached to the combo Box?
    Based on whatever value the user enters in that column that is rendered as a combo Box(editable) i should be able to do some validation. Is this possible?
    Thanks in advance for your time and patience.
    Archana

    Here's a start:
    public class FileModel5 extends AbstractTableModel
    public boolean isEditable = false;
    protected static int NUM_COLUMNS = 3;
    // initialize number of rows to start out with ...
    protected static int START_NUM_ROWS = 0;
    protected int nextEmptyRow = 0;
    protected int numRows = 0;
    static final public String file = "File";
    static final public String mailName = "Mail Id";
    static final public String postName = "Post Office Id";
    static final public String columnNames[] = {"File", "Mail Id", "Post Office Id"};
    // List of data
    protected Vector data = null;
    public FileModel5()
    data = new Vector();
    public boolean isCellEditable(int rowIndex, int columnIndex)
    // The 2nd & 3rd column or Value field is editable
    if(isEditable)
    if(columnIndex > 0)
    return true;
    return false;
    * JTable uses this method to determine the default renderer/
    * editor for each cell. If we didn't implement this method,
    * then the last column would contain text ("true"/"false"),
    * rather than a check box.
    public Class getColumnClass(int c)
    return getValueAt(0, c).getClass();
    * Retrieves number of columns
    public synchronized int getColumnCount()
    return NUM_COLUMNS;
    * Get a column name
    public String getColumnName(int col)
    return columnNames[col];
    * Retrieves number of records
    public synchronized int getRowCount()
    if (numRows < START_NUM_ROWS)
    return START_NUM_ROWS;
    else
    return numRows;
    * Returns cell information of a record at location row,column
    public synchronized Object getValueAt(int row, int column)
    try
    FileRecord5 p = (FileRecord5)data.elementAt(row);
    switch (column)
    case 0:
    return (String)p.file;
    case 1:
    return (String)p.mailName;
    case 2:
    return (String)p.postName;
    catch (Exception e)
    return "";
    public void setValueAt(Object aValue, int row, int column)
    FileRecord5 arow = (FileRecord5)data.elementAt(row);
    arow.setElementAt((String)aValue, column);
    fireTableCellUpdated(row, column);
    * Returns information of an entire record at location row
    public synchronized FileRecord5 getRecordAt(int row) throws Exception
    try
    return (FileRecord5)data.elementAt(row);
    catch (Exception e)
    throw new Exception("Record not found");
    * Used to add or update a record
    * @param tableRecord
    public synchronized void updateRecord(FileRecord5 tableRecord)
    String file = tableRecord.file;
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    boolean addedRow = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    { //update
    data.setElementAt(tableRecord, index);
    else
    if (numRows <= nextEmptyRow)
    //add a row
    numRows++;
    addedRow = true;
    index = nextEmptyRow;
    data.addElement(tableRecord);
    //Notify listeners that the data changed.
    if (addedRow)
    nextEmptyRow++;
    fireTableRowsInserted(index, index);
    else
    fireTableRowsUpdated(index, index);
    * Used to delete a record
    public synchronized void deleteRecord(String file)
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    data.removeElementAt(i);
    nextEmptyRow--;
    numRows--;
    fireTableRowsDeleted(START_NUM_ROWS, numRows);
    * Clears all records
    public synchronized void clear()
    int oldNumRows = numRows;
    numRows = START_NUM_ROWS;
    data.removeAllElements();
    nextEmptyRow = 0;
    if (oldNumRows > START_NUM_ROWS)
    fireTableRowsDeleted(START_NUM_ROWS, oldNumRows - 1);
    fireTableRowsUpdated(0, START_NUM_ROWS - 1);
    * Loads the values into the combo box within the table for mail id
    public void setUpMailColumn(JTable mapTable, ArrayList mailList)
    TableColumn col = mapTable.getColumnModel().getColumn(1);
    javax.swing.JComboBox comboMail = new javax.swing.JComboBox();
    int s = mailList.size();
    for(int i=0; i<s; i++)
    comboMail.addItem(mailList.get(i));
    col.setCellEditor(new DefaultCellEditor(comboMail));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for mail Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Mail Id to see a list of choices");
    * Loads the values into the combo box within the table for post office id
    public void setUpPostColumn(JTable mapTable, ArrayList postList)
    TableColumn col = mapTable.getColumnModel().getColumn(2);
    javax.swing.JComboBox combo = new javax.swing.JComboBox();
    int s = postList.size();
    for(int i=0; i<s; i++)
    combo.addItem(postList.get(i));
    col.setCellEditor(new DefaultCellEditor(combo));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for post office Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Post Office Id to see a list of choices");
    }

  • I have 2 docs in my iTunes file sharing box but they do not appear on my iPad not

    i have 2 docs in my iTunes file sharing box but they do not appear on my iPad. How can I transfer?

    Hi RU,
    You've stumbled into the Numbers (for Mac) area of Apple Support Communities with a question not related to Numbers.
    You'll have a better chance of finding an answer to your iPad question in the Using iPad community. The link will take you there.
    Regards,
    Barry

  • Adobe Acrobat 9: Javascript array populated combo box - Selected answer will not save

    I have a combo box on one of my forms that is populated using a Javascript array.  The combo box is populating just fine, but when an item is selected from that combo box, the selected item does not save when the user saves the document.  Any suggestions as to what the problem is and how it can be corrected?  I am a loss as to where to even begin looking.  Any help is greatly appreciated.
    Thank you.
    Lisa

    You might also want to check the Scripting forum
    http://forums.adobe.com/community/acrobat/acrobat_scripting

  • Having a combo box in a cell not to whole column

    I want to have a combo box in a cell of a table but not the whole column.Please help me in this .Its very important to our project

    Sorry , I don't want more space in cell.I want a combo box in a cell.But when i am setting the combo box it is applying to whole column and in every row i am getting a combobox .But i want to have a combo box in one row and a textfield in another row in the same column.
    Note : I am taking the input for a form in that i want a combo for background color ,font,size etc but i want a textfield for label .I think u have understood.
    thnx

  • Combo box selected index is not working.

    Hi guys, I have a problem with changing the combo box selected index.
    I load a list of phone types(such as "Home","Office",...) using Remote Object and assign it as a data provider for a combo box.What I need is to select a specific index in the combo but combo.selectedIndex statement doesn't work for the first time, I mean the combo changes its index only if I load the view again.
    I checked different examples, solutions but none of them worked for me!! Can anyone here help me to figure out the problem?
    Here is my Code:
    <mx:Canvas creationComplete="init()"
                 xmlns:mx="http://www.adobe.com/2006/mxml">
         <mx:ComboBox id="comboPhone0"
                    prompt="Type"
                    dataProvider="{phoneTypeList}"
                    />
    <mx:Script>
         <![CDATA[
    [Bindable]
    private var phoneTypeList:ArrayCollection;
    private function init():void
         loadPhoneType();
    private function loadPhoneType():void
         phoneTypeLoaderService.getPhoneType(); //phoneTypeLoaderService is a remote Object to load the phone types
    private function handlephoneTypeLoadResult(ev:ResultEvent):void
         phoneTypeList=ev.result as ArrayCollection;
            comboPhone.selectedIndex = getComboSelectedIndex("HOME");
    private function getComboSelectedIndex(phoneType:String):int
    var index : int= -1;
    var result : int= -1;
         for each (var pt:PhoneType in phoneTypeList)
              if (pt.type == phoneType)
                        result = index;
                        break;
              else{
                   index++;
              return result;
         ]]>
         </mx:Script>
    </mx:Canvas>

    hi
    I think in getComboSelectedIndex() method index should initialized to zero. If that does not work use after assigning the data from result event.
    phoneTypeList.refresh();
    Hope this helps
    Rush-me

  • Combo Box if "word" do not print.

    I have combo boxes that I want to set up so that if the box still says "select" that it will not print when i print the form.  Is this possible?

    Try this in the "Custom Validation Script"
    if (event.value == "Select"){
    event.target.display = display.noPrint
    } else {
    event.target.display = display.visible
    Change "Select" to match whatever your value is in the combobox.

  • With combo box, a pop up is appeared always....

    Hello,
    first of all, i use a combo box and a pie chart.
    When clicking on a pie slide, i ve activate a pop up window (enable drill-down, insertion type: status list ).
    If i close the pop up, using a push button (in data insertion -> Source data : a blank cell    &  in data insertion -> Destination : the corresponding cell of the pie slide for which the pop up should be appeared ), and then i choose another label from combo box, the pop up window is appeared again without having clicked on the corresponding pie slide before....
    So, is there any trick / solution to the above problem??
    thanks in advance!

    Hi Ramana,
    i 've done exactly what you suggest but the problem still exists....
    Here is what i ve done....
    At drill down tab of initial pie chart, have you setted a Source Data area? (destination data is the cell B32 as you suggest...).
    As i set insertion type of enable drill down "Row", i write the legends of initial pie chart in a row at Excel.. e.g.
                    A                                  B                           C                          D
    77    legend1 (cell A77)      legend2 (cell B77)     legend3 (C77)                 0
    78          0                                     0                               0
    79       
    I set:
    Source data :  A78:C78
    Destination :    A78 
    A79 = IF(OR(A79= "legend1";A79= "legend2";A79= "legend3");A79=1000;A79=4000)
    At pop up pie chart:
    dynamic visibility :  Status (A79)   & Key (1000)
    at push button: Source data (D77)  & Destination (A78)
    At your xlf file you don't face this problem by setting these options? I  might do something wrong.. i dont know..!
    Should i ve missed something, please let me know...
    Thanks a lot...

  • When downloading Adobe Reader, the Firefox instructions say to look for an "edit option" box. It does not appear and I am stuck.

    I am trying to download Adobe Reader for the new Firefox and it says to look for the "edit options" box. I can not find one and am stuck
    == This happened ==
    Just once or twice
    == I tried to download Adobe Reader

    The instructions on the Adobe site for Firefox are out-of-date and only apply to older versions of Firefox. You have the most current version of Adobe Reader (ver. 9.3.2) shown in your plug-ins. For future reference, use the instructions below for updating or installing Adobe Reader. You can see your version in Tools > Add-ons > Plugins, look for "Adobe PDF Plug-In".
    <u>'''Install/Update Adobe Reader for Firefox'''</u>: your ver. 9.3.2; current ver. 9.3.2
    Check your version here: http://www.mozilla.com/en-US/plugincheck/
    See: http://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox#Installing_and_updating_Adobe_Reader
    ''<u>You may be able to update from the Adobe Reader installed on your system</u>'' instead of going to the Adobe site and downloading. Start > Program Files, find and click Adobe Reader to open, click Help, click Check for Updates.
    ''<u>If you go to the Adobe site to download the current Adobe Reader:</u>''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    -See the images at the bottom left of this post to see the steps to take on the Adobe site
    -exit Firefox (File > Exit)
    -check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -double-click on the Adobe Reader installer you just downloaded to install/update Adobe Reader
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version. To install/update the IE ActiveX version, same instructions as above, except use IE to download the ActiveX installer.
    *Also see: http://kb.mozillazine.org/Adobe_Reader ~~red:'''''AND'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]
    Firefox_<u>'''''Other Issues'''''</u>: ~~red:You have installed plug-ins with known security issues. You should update them immediately.~~
    <u>'''Update Java'''</u>: your ver. 1.6.0.17; current ver. 1.6.0.20 (<u>important security update 04-15-2010</u>)
    (Firefox 3.6 and above requires Java 1.6.0.10 and above; see: http://support.mozilla.com/en-US/kb/Java-related+issues#Java_does_not_work_in_Firefox_3_6 )
    ''(Windows users: Do the manual update; very easy.)''
    Check your version here: http://www.mozilla.com/en-US/plugincheck/
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates Updating Java]'''
    Do the update with Firefox closed.
    <u>'''Install/Update Adobe Flash Player for _</u>: your ver. 10.0 r42; current ver. 10.1 r53 ('''important security update 2010-06-10''')
    Check your version here: http://www.mozilla.com/en-US/plugincheck/
    See: '''[http://support.mozilla.com/en-US/kb/Managing+the+Flash+plugin#Updating_Flash Updating Flash]'''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    -exit Firefox (File > Exit)
    -check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -double-click on the Adobe Flash installer you just downloaded to install/update Adobe Flash
    -when the Flash installation is complete, start Firefox, and test the Flash installation here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507&sliceId=1
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version of Flash. To install/update the IE ActiveX Adobe Flash Player, same instructions as above, except use IE to download the ActiveX Flash installer.
    *Also see: http://kb.mozillazine.org/Flash ~~red:'''''AND__''~~ [[How do I edit options to add Adobe to the list of allowed sites]]

  • TS1398 iPod touch shows router connection but tick box to connect does not appear

    Although it shows the wifi as connected the tick box doesn't appear just the 'spinning circle' showing it is trying to connect.  I've re-set router, network settings, restored ipod and I have other apple devices happily connected.  Model is brand new 4 32GB with latest software.  Now thinking it's a fault.

    Although it shows the wifi as connected the tick box doesn't appear just the 'spinning circle' showing it is trying to connect.  I've re-set router, network settings, restored ipod and I have other apple devices happily connected.  Model is brand new 4 32GB with latest software.  Now thinking it's a fault.

  • Combo box with a little twist?

    Hi everyone,
    Umm, i want to make a some drop boxes or combo boxes where if the user choose some option, than in the next combo boxes that option will not appear. Can I do that?
    How?
    Thanks for the help, sorry if this question had been asked, and especially sorry for the terrible english.
    Bence

    OK, I see now.
    So let's say the first box is called Combo1 and the second Combo2. You can add this code as the validate event of Combo1:
    var items = [];
    for (var i=0; i<event.target.numItems; i++) {
         if (event.value!=event.target.getItemAt(i,false))
             items.push(event.target.getItemAt(i,false));
    getField("Combo2").setItems(items);

  • Updating combo box in JTable

    While updating combo box in a JTable, after updating the first row when pointer (logical) goes to the second row it says value already exists. Kindly let me know if anyone has the solution for the same.

    While updating combo box in a JTable, after updating the first row when pointer (logical) goes to the second row it says value already exists. Kindly let me know if anyone has the solution for the same.

  • JTable & Combo Box

    Hello
    I have 2 combo box in the Jtable. Whenever there is something selected in the first drop down i have to repopulate the second combo box.
    JTable.populateData(ArrayList);
    Column renderer /editor
    TableColumn column1 = tablePane.getTable().getColumnModel().getColumn(
    1);
    columnn1.setCellEditor(new ComboBoxCellEditor(this));
    column1.setCellRenderer(new ComboBoxCellRenderer(this));
    TableColumn column2 = tablePane.getTable().getColumnModel().getColumn(
    2);
    column2.setCellEditor(new ComboBoxCellEditor(this));
    column2.setCellRenderer(new ComboBoxCellRenderer(this));
    How do i repopulate the data in 2nd combo box.

    It sounds like the combobox can be different for every row based on the value in another column in the row, therefore you need to dynamically change the editor for each row. This can be done by overriding the getCellEditor() method:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableComboBoxByRow extends JFrame
        ArrayList editors = new ArrayList(3);
        public TableComboBoxByRow()
            // Create the editors to be used for each row
            String[] items1 = { "Red", "Blue", "Green" };
            JComboBox comboBox1 = new JComboBox( items1 );
            DefaultCellEditor dce1 = new DefaultCellEditor( comboBox1 );
            editors.add( dce1 );
            String[] items2 = { "Circle", "Square", "Triangle" };
            JComboBox comboBox2 = new JComboBox( items2 );
            DefaultCellEditor dce2 = new DefaultCellEditor( comboBox2 );
            editors.add( dce2 );
            String[] items3 = { "Apple", "Orange", "Banana" };
            JComboBox comboBox3 = new JComboBox( items3 );
            DefaultCellEditor dce3 = new DefaultCellEditor( comboBox3 );
            editors.add( dce3 );
            //  Create the table with default data
            Object[][] data =
                 {"Color", "Red"},
                 {"Shape", "Square"},
                 {"Fruit", "Banana"},
                 {"Plain", "Text"}
            String[] columnNames = {"Type","Value"};
            DefaultTableModel model = new DefaultTableModel(data, columnNames);
            JTable table = new JTable(model)
                //  Determine editor to be used by row
                public TableCellEditor getCellEditor(int row, int column)
                    if (column == 1 && row < 3)
                        return (TableCellEditor)editors.get(row);
                    else
                        return super.getCellEditor(row, column);
            JScrollPane scrollPane = new JScrollPane( table );
            getContentPane().add( scrollPane );
        public static void main(String[] args)
            TableComboBoxByRow frame = new TableComboBoxByRow();
            frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
            frame.pack();
            frame.setVisible(true);
    }

  • Using Combo box to create options

    Hello,
    I am using a Framegrabber to acquire my images from our custom made sensors. We have several models so I wrote several Drivers for each one. I have managed to use a combo box with the names of the sensors to select which driver is loaded into the IMAQ board. However, because the application is getting more and more complex, and because I want to have one universal application for all our sensors, I want to have the ability to select different options according to the driver that is selected. For example, if I select Sensor A, and I want to use the serial communication, I want the address of sensor A to be used in the VI. If I choose Sensor B, the values related to sensor B are to be chosen. I guess the idea is simple to implement using an If Statement in C or other languages, but I don't want to go through that mess, and I want to implement it with LabVIEW.
    I could use a Case structure, but that only gives me two options. And I am not very good with Event structures and I do not know if I can use it for this. I also tried to use a local variable, but it would not let me change the values associated with the labels.
    If you understood what I was trying to say, and have an idea, I would greatly appreciate your help. If you are interested in helping but need a visual illustration, I can put a quick VI together for you.
    Thank you in advance,
    Rami

    Hi.
    I think I am doing something wrong, but, maybe someone can quickly enlighten me.
    The situation is this.
    I have a combo box with about 65 values. I want to feed these into a case structure (to select a range of settings to use later on)
    How do I get the values to also appear in the case headers? All I have is true and false..
    My output of the combo box is a string, not  a number. is that why I dont get the values automatically?
    I've attached the combobox and a case structure.
    /Brian
    Attachments:
    example2.vi ‏7 KB

  • Combo Box In QueryComponent

    Hi,
    I am using a programmatic view object in adf query component and have created List of values for one attribute by adding another programmatic ViewObject as ViewAccessor. In the Ui hints of that attribute i made list type as Combo Box. To populate the combo box, have overwritten the executeQueryForCollection of the ViewObject.
    With this appraoch am able to return the list of options(texts) to be displayed in combo box. But am not able to decide the value for each option in the combo box. System assigns zero based index as the values for options.
    Please some one tell me that Is there a way to define value for each option diplayed in the combo box.
    Thanks in Advance,
    Vivek....
    Edited by: Vivek Singh on Oct 22, 2009 10:11 PM

    You're catching Exceptions in empty catch() blocks. There might have been an exception, but you won't know if the catch block doesn't do anything.
    Try something like this:
    catch(SQLException e){
        System.err.println( "Problem with db query"+e.getMessage() );
        e.printStackTrace( System.err );
    }in order to see what's going wrong with your code.

Maybe you are looking for

  • SQL Query (updateable report) - Can't figure out how to make one

    Hi folks, Can someone tell me how to make a report where the data can be updated? Not an interactive report, a SQL report that selects only one row. The only options in the drop down I see are "SQL Query" and "SQL Query (PL/SQL function body returnin

  • Send Excel as attachment in SAP

    Hello All, My requirement is to send a mail with the contents of an ALV once it is displayed on the screen. This is working fine. Now the users want that 3 fields Quantity,NETPR and NETWR fields should send data to excel with 0,3 and 2 decimal places

  • A severe error occurred on the current command. The results, if any, should be discarded(Not Always)

    We have a DotNet website which is deployed on a physical server(windows server 2008 r2). The application is started to using for live. Most of the time application is  working fine. But some times we have noticed the application is failed to communic

  • JMS Queue - how to determine dynamically

    Hi, I have the following scenario File -> PI -> JMS Queue Based on the above I would like to dynamically determine the JMS Queue name based on the source file name, for example: XXX_data_file.xml        should route to JMS Queue   XXX_JMS_Q YYY_data_

  • Cell Borders

    I built a site www.centralcitydance.com in DW CS3 and used CSS for cell borders. They work great in Safari, but do not display correctly in IE. any suggestions