list « JComboBox « Java Swing Q&A





1. Java ComboBox What controls where list will display?    stackoverflow.com

Possibly an odd question but how can I change how my Java Swing combo box displays its list of items? The default behavior is for the list to be displayed ...

2. Java Swing ComboBox list of files from unix machine    stackoverflow.com

I'm running my first simple Java Swing application from my UNIX environment. Currently it has an image and some buttons that do random things - one of which executes a command ...

4. How to drop the list of a JcomboBox?    coderanch.com

Hi Swing Gurus, I have set a label for a comboBox, and the label has it mnemonic key setup. When I use Alt+mnemonic key of the label, I want to see the focus move to the comboBox and the list box should drop. (right now the list can drop only when the mouse is pointing the comboBox) Thansk a lot.

5. Howto: load a JComboBox list from a Hashtable?    coderanch.com

Thanks, Purvi, for your time and input. It is always appreciated. After some late evening work, I came up with this little piece of code which works : payDateString = new String[(jj+1)]; int yy=0; // for loading pay dates into the JComboBox list Enumeration enum = payDateTable.keys(); Object obj; while (enum.hasMoreElements()) { obj = enum.nextElement(); //System.out.println(obj + ": " + payDateTable.get(obj)); ...

6. Prevent Display of Drop List in JComboBox    coderanch.com

here's another way, but, depending on what else you are doing, it might be a bit too much of a hack run the program, click the arrow button - no popup click the add button to add an item, then reclick the arrow button - popup displays import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.plaf.basic.*; class Testing extends JFrame { JComboBox ...

7. Preventing the unrolled list of a JComboBox to close    coderanch.com

Greetings I created a class inheriting from JDialogBox : JDialogB_ComboBEdition . I combined an own JDialogB_ComboBEdition object to the 'mouseClicked()' function of a MouseListener, to have a dialog box getting opened when the user clicks left in the text field of the closed combo box. tab1_Dialog1 = new JDialogB_ComboBEdition(new javax.swing.JFrame(), true); ... tab1_jComboBox2.addMouseListener( new MouseListener() { public void mouseClicked(MouseEvent evt) { ...

8. How at save list in Jcombobox...    java-forums.org

import java.awt.*; import java.sql.*; import java.awt.event.*; import javax.swing.*; public class Item extends Frame implements ActionListener{ JComboBox dep,type,supp; Button save,back,clr,exit; String s4,s1; TextField icode; Label l1; public Item() { super("ITEM"); setSize(450,500); setLayout(null); setBackground(new java.awt.Color(180, 180, 180)); l1=new Label("ITEMNAME"); icode=new TextField(); String su[]={"item1"," iem2","item3" }; supp=new JComboBox(su); save= new Button("SAVE"); back= new Button("BACK"); clr= new Button("CLEAR"); exit= new Button("EXIT"); l1.setBounds(20,60,100,60); icode.setBounds(150,70,120,30); supp.setBounds(20,130,210,30); save.setBounds(290,80,100,40); ...

9. JCombobox and java.awt.List    forums.oracle.com





10. Keeping id's of list for JCombobox    forums.oracle.com

Hi, i'm filling a JCombobox with database values (Strings) of a table. Every string has an internal ID, which i use to store in other tables.. My problem is the following: i know i can detect what the user selected (getSelectedIndex() and getSelectedValue()), but what does that mean to me. GetSelectedIndex is only a number and GetSelectedValue is the text in ...