JComboBox dropdown table list

Hi,
Any helps will be very appreciated.
I have a problem in the JCombobox dropdown list. I want to have multiple columns in the dropdown list of the JComboBox, eg. when I type something in the JComboBox, it will query some infomation from the Database. The Database will return more 3 fields of the query results. I would like to have these three fields stored in the table format as JComboBox drowdown list. When I select a row and only one of the columns will be displayed in the JComboBox.
Thanks a lot
Catherine

I found these posts in about 10 seconds ...
http://forum.java.sun.com/thread.jsp?forum=57&thread=330533
http://forum.java.sun.com/thread.jsp?forum=57&thread=160944
http://forum.java.sun.com/thread.jsp?forum=57&thread=379524

Similar Messages

  • Dropdown Check List

    Hi Group,
    I recently came across this example below :
    http://code.google.com/p/dropdown-check-list/ Wondering if anyone has implemented similar feature in ApEx.
    If it is, can you please share the page or give me some inputs on how to implement it.
    I want the values in the list to be dynamic from a table.
    I am using ApEx 4.0.2.
    Thanks,
    Raj.

    Teku wrote:
    Hi Group,
    I recently came across this example below :
    http://code.google.com/p/dropdown-check-list/ Wondering if anyone has implemented similar feature in ApEx.
    If it is, can you please share the page or give me some inputs on how to implement it.
    I want the values in the list to be dynamic from a table.
    I am using ApEx 4.0.2.
    Thanks,
    Raj.Create a select list based on dynamic lov with setting the option allow multiple values to Yes
    Download and include the javascript file ui.dropdownchecklist-1.4-min.js from the plugin page and include in your page/app/template as per your requirement.
    See this apex example http://apex.oracle.com/pls/apex/f?p=46417:45
    Login as test/test

  • Unable to view table list in sql developer

    I am able to connect to the database through sql developer but unable to view tables list.
    Select query is displaying the contents though.
    Any Help ???

    Using SQL Developer, I log in using the owner user id and password. I can see all but one of my materialized views. It was definitely created by the user id I'm logged in as. A query of user_objects in sql+ shows all MVs, including the one that's missing in SQL Developer. If I log in using the same credentials in TOAD, the MV is displayed in the current schema, as I'd expect. The super weird thing is that if I use the previous version of SQL Developer, I see that MV! Any thoughts?
    Edited by: [email protected] on Feb 25, 2009 9:19 AM

  • SQL Developer 1.5.3 - Slow loading of Table list - expanding tables in tree

    In SQL Developer 1.5.3, I've noticed that loading the list of tables is very slow - like REALY slow
    If I log into the same schema using previous release 1.1.2.25, the same table list is loaded almost instantly.
    Gone back to 1.1.2.25 because of this pain

    according to TheFurryOne...
    There is a known problem with the performance of the tables node on the connection navigator in SQL Developer 1.5.3
    Here is a thread that discusses it...links:Re: Still experienceing problems "tables" node performance

  • Unable to retrieve table list when trying to reverse

    Hi,
    I am trying to load source data which is coming from SQL Server into Oracle target database.
    When am trying to create model and reverse the source tables coming frm SQL Server it's giving me an error saying Cannot retrieve tables list.
    Do I need to configure anything?
    Any help is appreciated.
    Thanks,
    Adi

    Hi
    When am trying to test the conenction in Topology Manager, it's givine me an error
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sunopsis.dwg.dbobj.SnpMtxt.saveText(SnpMtxt.java)
         at com.sunopsis.dwg.dbobj.SnpConnect.saveText(SnpConnect.java)
         at com.sunopsis.graphical.frame.a.ji.bx(ji.java)
         at com.sunopsis.graphical.frame.bn.w(bn.java)
         at com.sunopsis.graphical.frame.bn.d(bn.java)
         at com.sunopsis.graphical.frame.w.actionPerformed(w.java)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: com.sunopsis.core.SecurityAccessException: com.sunopsis.core.SecurityAccessException: You are not authorized to Edit the Object:SNP_CONNECT : ORACLE_MD_BDO / 35006
         at com.sunopsis.dwg.DwgObject.setterSecurityControl(DwgObject.java)
         at com.sunopsis.dwg.dbobj.generated.GeneratedSnpConnect.setITxtJavaUrl(GeneratedSnpConnect.java)
         at com.sunopsis.dwg.dbobj.generated.GeneratedSnpConnect.setITxtJavaUrl(GeneratedSnpConnect.java)
         ... 33 more
    Do I need to configure anything?

  • Unable to view table list

    I am able to connect to the database through sql developer but unable to view tables list.
    Select query is displaying the contents though.
    Any Help ???

    I am on Windows XP using SQLDeveloper Build 5440 and I am having a similar problem (I think).
    I am able to connect to the database, I am able to see a list of all the tables (as the owner) in the tree but i can not see anything under columns and am shown 5 all null rows under data. I am able to view statistics, DDL and I can query the table with a select and get results. I have tried reverting to an older versin of SQLDeveloper but that gave me the same result.
    If this is the same problem then I am having it too. Any help would be appreciated. Thanks in advance.
    Greg

  • Question on "No Selection" Item for a dropdown data list?

    I'm trying to set a dropdown data list on an input form to have a default value. It appears that the first item in the list (which will show as the default) is always interpreted as a null value? Is there a way to display a default value that won't be interpreted as null? Does NullValueFlag affect this behavior and if so, how? In the example below, I want 'United States' to be the default value and not be interpreted as null.
    From the Online help - 'Using Complex UI Components'
    "The selectOneChoice component supports a null value, that is, if the user has not selected an item, the label of the item is shown as blank, and the value of the component defaults to an empty string. Instead of using blank or an empty string, you can specify a string to represent the null value. By default, the new string appears at the top of the list of values that is defined in step 3"
    <list id="View1country" IterBinding="View1Iterator"
    ListOperMode="0" StaticList="true" NullValueFlag="1">
    <AttrNames>
    <Item Value="country"/>
    </AttrNames>
    <ValueList>
    <Item Value="United States"/>
    <Item Value="Canada"/>
    </ValueList>
    </list>

    Hi,
    No, there's no point in handling exceptions that can't possibly occur, and the UPDATE statement you posted can't possibly raise a NO_DATA_FOUND exception.

  • Workflows table is not showing up in Data Manager drop down table list

    Hi,
    I am able to see Workflows table in Console but not able to see it Data Manager drop down table list in record mode for selection.
    Even not allowed to create another workflow table.
    Thanks for any tips/clue
    -reo

    Reo,
    You will not be able to create another workflow table. There is only a single workflow table that will hold all the workflows you create through the Data Manager.
    As Vito mentioned, please make sure to load the corresponding MDMWorkflow component on the client machines running the Data Manager that you wish to create and view workflows from.
    Once the workflow component is installed you should see it as a new tab in the Data Manager. You will need Visio to create workflows.
    Thanks,
    Tim

  • Physical table list against Cluster Table CDPOS and PCDPOS

    Hello experts,
    For function customized requirement, we need to know the physical table
    list against Cluster Table CDPOS and PCDPOS and EDID4, just like
    Cluster Table BSEG contain with six physical tables
    BSAD/BSID/BSAS/BSIS/BSAK/BSIK. Also we want to know if there is any
    general way to find out the physical table list for any cluster table.
    My question is:
    1. How can I find all the transparent table for Cluster Table CDPOS?
    just like Cluster Table BSEG has transparent tables of
    BSAD/BSID/BSAS/BSIS/BSAK/BSIK.
    2. How can I find all the transparent table for Cluster Table PCDPOS?
    3. How can I find all the transparent table for Cluster Table EDID4?
    4. Additionally,I want to know if there is any
    general way to find out all the transparent tables for an specific
    cluster table.
    Many thanks.

    Hello,
    simply look in transaction SE11.
    Example:
    1.  SE11 -> Table CDPOS - Display. On Tab 'Delivery and Maintenance' you'll find Pool/Cluster 'CDCLS'.
    2. SE11 -> Table CDCLS -> Display. On next screen position on CDCLS-> Where-used-list -> Tables -> you'll find tables CDPOS and PCDPOS.
    Same thing with EDID4    -> EDI40 ...
    Regards Wolfgang

  • Multi Row Selection in Table list

    Hi All,
    Currently in our scenorio, we are able to select only one row at a time from the table list, but we need to select multiple row at a time.
    Even we have tried to select multi row using CTRL key but if we select another row previous selection got removed.
    Kindly suggest where we need to make modification.
    Thank you,
    Cha

    Balan,
    I have a Search Result View which allows users to select multiple rows. To process, user clicks the custom button "Submit" added on the Tool bar. In the event handler i wrote the below code. This is selecting only last record. But i want to read all selected rows.
    --- htm page
    <chmlb:configTable id         
    = "Table"
    reset      
    = "<%= controller->get_reset_flag( ) %>"
    actions    
    = "<%= controller->gt_button %>"
    navigationMode  = "BYPAGE"
    table      
    = "//RESULT/Table"
    visibleRowCount = "<%= lv_visiblerows %>"
    usage      
    = "SEARCHRESULT"
    downloadToExcel = "<%= lv_export %>"
    selectedRowIndexTable = "<%= RESULT->SELECTION_TAB %>"
    selectionMode    
    = "<%= RESULT->SELMODE_MULTI %>"
    onRowSelection   
    = "SELECT"
    showNoMatchText = "FALSE" />
    method submit.
      data: lv_collection TYPE REF TO if_bol_bo_col,
          lv_property_access TYPE REF TO if_bol_bo_property_access.
         lv_collection ?= me->typed_context->result->collection_wrapper->get_marked( ).
         lv_property_access = lv_collection->get_first( ).
         WHILE lv_property_access IS not INITIAL.
             lv_property_access = lv_collection->get_next( ).
         endwhile.
    endmethod.
    Thanks
    Tim

  • Web Application Designer Dropdown Hier List Question

    Hello all,
    I have run into a roadblock for the Dropdown Hier List Web Item. I have the object working but now have a request when reselecting the same object in the Dropdown List, an action to "Open Template Dialog" needs to execute again.
    For Example in my Dropdown list I have Profit Center and Plant listed. Based on selecting either value, the action "Open Template Dialog" executes and then proceed to select the lower level nodes and execute the page. But now the new requirement now is while on that same Dropdown selection of either Profit Center or Plant, without using a reset button etc if the user selects Profit Center or Plant again they would like the "Open Template Dialog" to execute again.
    I have no trouble if the user selects Profit Center then Plant to do this but if a user selects Profit Center then Profit Center again it does nothing which I believe that is how it is to function. But I wanted to know if anyone knows possible way to do this.
    Thanks in advance!

    Hello Carlos,
    Have a look at this Note
    SAP Note 901213 BI 70 SP6 dropdown box: No reference for Data Provider
    Thanks
    Chandran

  • Get table list  of  fmb

    hi,
    I need to get table list that used on xx.fmb form
    for ex: I run a oracle form " find_table" then brows and choose xx.fmb file
    then press read button in " find_table" for create a text file for xx.fmb all tables
    is it doable?
    please help me

    I'm not sure that i understood your question.
    Do you want to scan all block in the FMB and get the DB source name they based on?

  • New printer not showing on printer dropdown selection list

    Hi.
    I had a canon MP600 printer that I removed and replaced with Canon MG5350. It prints fine for word/excel but for adobe pdf the new printer does not appear in the select printer list, but the old one still does. I can't print any pdf file and don't have the old printer.
    How can I get the new printer to appear in the list?
    Please do help.
    Thank you

    Morning Steve
    OS is windows 7, and I had no problems with printing other docs, only pdf, but....
    I was searching around other forums and came across this fix, hooray
    https://exploreb2b.com/articles/solving-error-0x00000709-cant-set-default-printer-problem
    However, if the permission is denied, click on edit tab and allow permissions. Then you can delete the device printer.
    Then, I went back to control panel, devices and printers, selece the new printer as default and hip hip hooray.
    Anyone else having problem where the new printer, or indeed a printer doesn't show on the printer dropdown selection list, can try and use the above method. It worked for me.
    Good luck and thanks to ALL.

  • Stop JcomboBox dropdown

    Hi everyone,
    I have a requirement to not allow the dropdown list of JComboBox to pop up in certain situations. I could disable the combo box, but that is not the preferred option. I tried to over write JComboBox.firePopupMenuWillBecomeVisible(). The problem with that is: the drop down list (which is a pop up) is already set to visible at this time.
    Any suggestion?
    Thanks,
    Genseng

    this might be one way
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.plaf.basic.BasicComboBoxUI;
    import javax.swing.plaf.basic.BasicComboPopup;
    class Testing extends JFrame
      JComboBox cbo = new JComboBox(new String[]{"London","Madrid","New York","Rome","Sydney","Washington"});
      JRadioButton rb = new JRadioButton("No Popup");
      public Testing()
        setLocation(400,300);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        cbo.setUI(new MyUI());
        JPanel jp = new JPanel();
        jp.add(rb);
        jp.add(cbo);
        getContentPane().add(jp);
        pack();
        rb.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            if(rb.isSelected()) cbo.setUI(new MyUI_NoPopup());
            else cbo.setUI(new MyUI());}});
      class MyUI extends BasicComboBoxUI
        protected javax.swing.plaf.basic.ComboPopup createPopup()
          return super.createPopup();
      class MyUI_NoPopup extends BasicComboBoxUI
        protected javax.swing.plaf.basic.ComboPopup createPopup()
          BasicComboPopup popup = (BasicComboPopup)super.createPopup();
          popup.setPreferredSize(new Dimension(0,0));
          return popup;
      public static void main(String args[]){new Testing().setVisible(true);}
    }

  • Resize JComboBox dropdown doesn't work without customized ListCellRenderer

    Based on the forum thread Horizontal scrollbar for JComboBox across multiple look and feel , the following code will work, if only I provide a customized ListCellRenderer (A JPanel with several JLabels).
    FYI, here is my ListCellRenderer code [http://jstock.cvs.sourceforge.net/viewvc/jstock/jstock/src/org/yccheok/jstock/gui/ResultSetCellRenderer.java?view=markup]
    Here is the code which adjust the drop down list width. The setup instruction is exactly same as the one mentioned in forum by Kleopatra
        private void adjustPopupWidth() {
            if (this.getItemCount() == 0) return;
            Object comp = this.getUI().getAccessibleChild(this, 0);
            if (!(comp instanceof JPopupMenu)) {
                return;
            JPopupMenu popup = (JPopupMenu) comp;
            JScrollPane scrollPane = (JScrollPane) popup.getComponent(0);
            Object value = this.getItemAt(0);
            Component rendererComp = this.getRenderer().getListCellRendererComponent(null, value, 0, false, false);       
            if (rendererComp instanceof JXTable) {
                scrollPane.setColumnHeaderView(((JTable) rendererComp).getTableHeader());
            Dimension prefSize = rendererComp.getPreferredSize();
            Dimension size = scrollPane.getPreferredSize();
            size.width = Math.max(size.width, prefSize.width);
            scrollPane.setPreferredSize(size);
            scrollPane.setMaximumSize(size);
            scrollPane.revalidate();
        }However, when come to a JComboBox, without explicitly provided it a list cell renderer, the above code will have NPE being thrown at line
           Component rendererComp = this.getRenderer().getListCellRendererComponent(null, value, 0, false, false);
           // Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
           // at javax.swing.plaf.basic.BasicComboBoxRenderer.getListCellRendererComponent(BasicComboBoxRenderer.java:94)Hence, I modify the code as follow and hoping it will work.
        private void adjustPopupWidth() {
            if (this.getItemCount() == 0) return;
            Object comp = this.getUI().getAccessibleChild(this, 0);
            if (!(comp instanceof JPopupMenu)) {
                return;
            JPopupMenu popup = (JPopupMenu) comp;
            JScrollPane scrollPane = (JScrollPane) popup.getComponent(0);
            Object value = this.getItemAt(0);
            //Component rendererComp = this.getRenderer().getListCellRendererComponent(null, value, 0, false, false);
            Component rendererComp = this.getRenderer().getListCellRendererComponent((JList)scrollPane.getViewport().getView(), value, 0, false, false);       
            if (rendererComp instanceof JXTable) {
                scrollPane.setColumnHeaderView(((JTable) rendererComp).getTableHeader());
            Dimension prefSize = rendererComp.getPreferredSize();
            Dimension size = scrollPane.getPreferredSize();
            size.width = Math.max(size.width, prefSize.width);
            scrollPane.setPreferredSize(size);
            scrollPane.setMaximumSize(size);
            scrollPane.revalidate();
        }No more exception being thrown this time. Just that my dropdown list doesn't resize at all when I have a long String. It remains normal size as usual, with horizontal scrollbar being shown to catter the long String.
    Is there anything I had missed out?
    Thanks
    Edited by: yccheok on Oct 23, 2010 9:40 PM
    Edited by: yccheok on Oct 23, 2010 9:41 PM

    Yes. The problem solved. Out of curiosity, is it necessary to have statement? As I remove it, it just work as well.
    scrollPane.revalidate();I include SSCCE for this problem.
    package sandbox;
    import java.awt.Component;
    import java.awt.Dimension;
    import javax.swing.JList;
    import javax.swing.JPopupMenu;
    import javax.swing.JScrollPane;
    import javax.swing.plaf.basic.BasicComboPopup;
    * @author yccheok
    public class NewJFrame extends javax.swing.JFrame {
        /** Creates new form NewJFrame */
        public NewJFrame() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            jComboBox1 = new javax.swing.JComboBox();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            getContentPane().setLayout(new java.awt.FlowLayout());
            jComboBox1.setEditable(true);
            jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Long Long Long Long Item 4" }));
            jComboBox1.setPreferredSize(new java.awt.Dimension(80, 20));
            jComboBox1.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
                public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
                public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                    jComboBox1PopupMenuWillBecomeVisible(evt);
            getContentPane().add(jComboBox1);
            pack();
        }// </editor-fold>
        private void jComboBox1PopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            adjustPopupWidth();
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
        private void adjustPopupWidth() {
            if (jComboBox1.getItemCount() == 0) return;
            Object comp = jComboBox1.getUI().getAccessibleChild(jComboBox1, 0);
            if (!(comp instanceof JPopupMenu)) {
                return;
            JPopupMenu popup = (JPopupMenu) comp;
            JScrollPane scrollPane = (JScrollPane) popup.getComponent(0);
            Object value = jComboBox1.getItemAt(0);
            Component rendererComp = jComboBox1.getRenderer().getListCellRendererComponent((JList)scrollPane.getViewport().getView(), value, 0, false, false);
            //if (rendererComp instanceof JXTable) {
            //    scrollPane.setColumnHeaderView(((JTable) rendererComp).getTableHeader());
            //Dimension prefSize = rendererComp.getPreferredSize();
            BasicComboPopup basic = (BasicComboPopup)comp;
            Dimension prefSize = basic.getList().getPreferredSize();
            Dimension size = scrollPane.getPreferredSize();
            size.width = Math.max(size.width, prefSize.width);
            scrollPane.setPreferredSize(size);
            scrollPane.setMaximumSize(size);
            //scrollPane.revalidate();
        // Variables declaration - do not modify
        private javax.swing.JComboBox jComboBox1;
        // End of variables declaration
    }

Maybe you are looking for

  • Payment method declined

    The App Store keeps on asking me to renew my payment method before I carry on with a download, even though nothing has changed with my payment method and I'm not trying to purchase anything either, I only wanted to update my apps. I waited to see if

  • How can I import data in an interactive PDF?

    Hello everyone, I'm trying to import data (in this case, price lists created in Excel) in a PDF that needs be interactive; The goal is to actually make up a document (in InDesign) using form fields, and then have that data imported in the form fields

  • Facebook issues

    Anyone else having issues with Facebook (pre-loaded app that came with Droid 1 initially)? All I'm getting now is "An error had occurred while fetching data" when I hit News Feed. I have 2.2 but have used app since the download with no problems.

  • Welcome to BT. Please stand still while I repeated...

    My experience so far: Was (and thankfully still am just) with Virgin. Ordered Infinity, TV and phone from BT. Mainly because I want Moto GP in 2014. First engineer slot. Engineer no show. Phoned up. Order was cancelled but nobody mentioned it. Excell

  • How to invoke a webservice from ADF Mobile application.

    Hi, I have developed a webservice from a PL/SQL Package in jdeveloper 11.1.1.5.0 by following below link http://www.oracle.com/webfolder/technetwork/tutorials/obe/jdev/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm#p. it went on smooth ti