Swing Combobox Doesn't "Drop Down"

I'm fairly new to Java, so bear with me.

I am creating an applet (using Visual Cafe) and have added a Swing Combobox.

When the applet is run, and I click on the combobox, the list portion doesn't appear.  The Combobox highlights, and with the arrow keys I can cycle through the list, but I need it to drop so that I can select.
LVL 6
clifABBAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vladi21Commented:
post ur code
0
clifABBAuthor Commented:
/*
      A basic extension of the java.applet.Applet class
 */

import java.awt.*;
import java.applet.*;
import com.sun.java.swing.JLabel;
import com.sun.java.swing.JTextField;
import com.symantec.itools.swing.borders.BevelBorder;
import com.symantec.itools.swing.borders.EtchedBorder;
import com.symantec.itools.swing.borders.MatteBorder;
import com.symantec.itools.swing.borders.SoftBevelBorder;
import com.symantec.itools.swing.borders.TitledBorder;
import com.symantec.itools.swing.borders.CompoundBorder;
import com.symantec.itools.swing.borders.EmptyBorder;
import com.sun.java.swing.JTable;
import com.sun.java.swing.table.*;
import com.sun.java.swing.JScrollPane;
import com.symantec.itools.swing.models.StringComboBoxModel;
import com.symantec.itools.swing.models.StringTableModel;
import com.sun.java.swing.JComboBox;
import java.sql.*;
import oracle.dacf.dataset.*;

public class DDTableInfoVC extends Applet
{
      public void init()
      {
            // Take out this line if you don't use symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller
            //symantec.itools.lang.Context.setApplet(this);
      
            // This code is automatically generated by Visual Cafe when you add
            // components to the visual environment. It instantiates and initializes
            // the components. To modify the code, only use code syntax that matches
            // what Visual Cafe can generate, or Visual Cafe may be unable to back
            // parse your Java file into its visual environment.
            //{{INIT_CONTROLS
            setLayout(null);
            setBackground(java.awt.Color.lightGray);
            setSize(566,472);
            JLabel1.setText("Table Name:");
            add(JLabel1);
            JLabel1.setBounds(12,12,99,19);
            JLabel2.setText("Description:");
            add(JLabel2);
            JLabel2.setBounds(12,36,99,19);
            JLabel3.setText("Type:");
            add(JLabel3);
            JLabel3.setBounds(12,60,99,19);
            JLabel4.setText("Download Flag:");
            add(JLabel4);
            JLabel4.setBounds(12,84,99,19);
            JLabel5.setText("Upload Flag:");
            add(JLabel5);
            JLabel5.setBounds(156,84,99,19);
            JLabel6.setText("Version:");
            add(JLabel6);
            JLabel6.setBounds(336,12,99,19);
            softBevelBorder1.setBevelType(com.sun.java.swing.border.BevelBorder.LOWERED);
            //$$ softBevelBorder1.move(72,473);
            lblDescription.setOpaque(true);
            lblDescription.setBorder(softBevelBorder1);
            add(lblDescription);
            lblDescription.setBackground(java.awt.Color.white);
            lblDescription.setForeground(java.awt.Color.black);
            lblDescription.setFont(new Font("SansSerif", Font.PLAIN, 12));
            lblDescription.setBounds(108,36,192,19);
            lblType.setOpaque(true);
            lblType.setBorder(softBevelBorder1);
            add(lblType);
            lblType.setBackground(java.awt.Color.white);
            lblType.setForeground(java.awt.Color.black);
            lblType.setFont(new Font("SansSerif", Font.PLAIN, 12));
            lblType.setBounds(108,60,96,19);
            lblDLFlag.setOpaque(true);
            lblDLFlag.setBorder(softBevelBorder1);
            add(lblDLFlag);
            lblDLFlag.setBackground(java.awt.Color.white);
            lblDLFlag.setForeground(java.awt.Color.black);
            lblDLFlag.setFont(new Font("SansSerif", Font.PLAIN, 12));
            lblDLFlag.setBounds(108,84,19,19);
            lblULFlag.setOpaque(true);
            lblULFlag.setBorder(softBevelBorder1);
            add(lblULFlag);
            lblULFlag.setBackground(java.awt.Color.white);
            lblULFlag.setForeground(java.awt.Color.black);
            lblULFlag.setFont(new Font("SansSerif", Font.PLAIN, 12));
            lblULFlag.setBounds(228,84,19,19);
            lblVersion.setOpaque(true);
            lblVersion.setBorder(softBevelBorder1);
            add(lblVersion);
            lblVersion.setBackground(java.awt.Color.white);
            lblVersion.setForeground(java.awt.Color.black);
            lblVersion.setFont(new Font("SansSerif", Font.PLAIN, 12));
            lblVersion.setBounds(396,12,96,19);
            JScrollPane1.setOpaque(true);
            add(JScrollPane1);
            JScrollPane1.setBounds(12,108,547,349);
            grdMain.setModel(mdlGrid);
            grdMain.setRowSelectionAllowed(false);
            grdMain.setAutoResizeMode(com.sun.java.swing.JTable.AUTO_RESIZE_LAST_COLUMN);
            JScrollPane1.getViewport().add(grdMain);
            grdMain.setBounds(0,0,544,327);
            {
                  String[] tempString = new String[1];
                  tempString[0] = " , , , , , , , ";
                  mdlGrid.setItems(tempString);
            }
            mdlGrid.setColumnHeaders("Column Name,Seq,Key,Type,Length,Nulls,UOM,Description");
            //$$ mdlGrid.move(96,473);
            add(cboTables);
            cboTables.setBounds(108,12,192,19);
            //}}
      }
      
      //{{DECLARE_CONTROLS
      com.sun.java.swing.JLabel JLabel1 = new com.sun.java.swing.JLabel();
      com.sun.java.swing.JLabel JLabel2 = new com.sun.java.swing.JLabel();
      com.sun.java.swing.JLabel JLabel3 = new com.sun.java.swing.JLabel();
      com.sun.java.swing.JLabel JLabel4 = new com.sun.java.swing.JLabel();
      com.sun.java.swing.JLabel JLabel5 = new com.sun.java.swing.JLabel();
      com.sun.java.swing.JLabel JLabel6 = new com.sun.java.swing.JLabel();
      com.symantec.itools.swing.borders.SoftBevelBorder softBevelBorder1 = new com.symantec.itools.swing.borders.SoftBevelBorder();
      com.sun.java.swing.JLabel lblDescription = new com.sun.java.swing.JLabel();
      com.sun.java.swing.JLabel lblType = new com.sun.java.swing.JLabel();
      com.sun.java.swing.JLabel lblDLFlag = new com.sun.java.swing.JLabel();
      com.sun.java.swing.JLabel lblULFlag = new com.sun.java.swing.JLabel();
      com.sun.java.swing.JLabel lblVersion = new com.sun.java.swing.JLabel();
      com.sun.java.swing.JScrollPane JScrollPane1 = new com.sun.java.swing.JScrollPane();
      com.sun.java.swing.JTable grdMain = new com.sun.java.swing.JTable();
      com.symantec.itools.swing.models.StringTableModel mdlGrid = new com.symantec.itools.swing.models.StringTableModel();
      com.sun.java.swing.JComboBox cboTables = new com.sun.java.swing.JComboBox();
      //}}

      public void start() {
          loadTableList();
          setupGrid();
      }
      
      public void loadTableList() {
      cboTables.addItem("Line 1");
        cboTables.addItem("Line 2");
        cboTables.addItem("Line 3");
        cboTables.addItem("Line 4");
        cboTables.addItem("Line 5");
      }


}
0
vladi21Commented:
cboTables.setBounds(108,12,192,19);

try
cboTables.setBounds(108,12,192,100); :)

or better use normal layout
setLayout(null);  - very bad

0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

clifABBAuthor Commented:
vladi21:
"cboTables.setBounds(108,12,192,100);"
Tried that.  It made the combo box bigger, but it still didn't drop down.

The Layout produced an interesting effect.  I tried changing the layout to one of the various default selections that Visual Cafe allows and it completely screwed up the control positions of my applet.  However, the Combobox was still visible, and it did drop down.  So, now the question is, how do I keep the position of all my controls, and have the combo box drop down as well?
0
vivexpCommented:
Try this out!!!

public void setPopupVisible(boolean v)

eg:
public void setPopupVisible(true)
0
heyhey_Commented:
don't mix AWT and Swing components.
extend JApplet instead of java.awt.Applet.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
clifABBAuthor Commented:
vivexp:
I tried as you suggested and nothing is different.
0
clifABBAuthor Commented:
heyhey_:
What you suggested works perfectly.  Thanks for the help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.