Problem « JComboBox « Java Swing Q&A





1. problem w/ multiple jcombobox    stackoverflow.com

I've been working with a project that requires me to use mutiple jcombobox. I did try to chain three jcombobox but failed to show all necessary drop-down lists. In one of my ...

2. JCombobox Problem    bytes.com

Can you please show your code here and point out the problem? (You only told us what you want to do, but not where your problem is and how we could ...

3. problem in JComboBox    coderanch.com

4. JComboBox: Opaque problem    coderanch.com

5. JComboBox problem    coderanch.com

6. URGENT! JCombobox Problem    coderanch.com

7. JComboBox ActionListenet problem    coderanch.com

Hi, I hope u remember that the JCombobox is not a single control. It is made of several controls. It is a JTextField+List+button. So i think that the actionlistener is getting fired for all these controls. This is juz a guess. Anyhow can u check the source of these action events? Regards Saj

8. JComboBox Drag Problem    coderanch.com

9. JComboBox problem    coderanch.com

hi, I have a combobox.. it contains a list of value.... when any one item selected, the whole list get change.. i have used action listener to perform this operation... but i have a problem with it... when i change the items in the combo box, again the action listener is triggered.. i want the event to trigger only when user ...





10. Problem of JComboBox:    coderanch.com

11. problem with JCombobox    coderanch.com

I have a combobox on panel. Also I have a Jbutton 'search'with function key F2 on a dilaog. The panel where combobox is added is added on dialog I am filling some data into the combobox. When I select any item from combobox and click on 'search' button then eveything works fine. But if instead of clicking on button using mouse ...

12. JComboBox problem    coderanch.com

13. problem in JComboBox    coderanch.com

14. JComboBox problem    coderanch.com

I was asked to look at the problem with searchable JCombBox. Basically it defines combo box to be editable and searches for input string from combo box's data. Here is the code: import javax.swing.*; import java.awt.event.*; import java.util.*; class eSearchComboBoxOrig extends JComboBox { int index=0; JComboBox thisCB; public eSearchComboBoxOrig() { super(); init(); } public eSearchComboBoxOrig(Object[] items) { super(items); init(); } public ...

15. JComboBox ... Problem :-(    coderanch.com

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - ...

16. Weird Problem JComboBox    coderanch.com

I am working on quite complex GUI project and we have almostly customzied every Component class. I am facing very weird problem which I have never faced. I have combo box on screen and It is enabled and non editable. Programmitcally I do some complex things and populate it. The thing is that the elements in combo box are of grey ...





17. JComboBox problem    coderanch.com

i've this object (Tecnica) and in it i have a toString method that returns Tecnica's name. in order to dinamically populate my combo i have an HQL query "from Tecnica as t order by t.nome asc"; this query returns a list of Tecnica objects; i iterate the list to populate the combo: public List preencheComboNome() throws HibernateException { inicio(); lista = ...

18. JComboBox Problem    coderanch.com

see if this is any closer to what you want import javax.swing.*; import java.awt.*; import javax.swing.plaf.basic.BasicComboBoxUI; class Testing extends JFrame { JComboBox cbo = new JComboBox(new String[]{"London","Madrid","New York","Rome","Sydney"}); public Testing() { setSize(150,75); setLocation(400,300); setDefaultCloseOperation(EXIT_ON_CLOSE); JPanel jp = new JPanel(); jp.setBackground(Color.RED); cbo.setEditable(true); cbo.setOpaque(false); makeTransparent(cbo.getComponents()); jp.add(cbo); getContentPane().add(jp); } public void makeTransparent(Component[] comp) { for(int x = 0; x < comp.length; x++) { if(comp[x] ...

19. Problem JComboBox    coderanch.com

Hi, i have following Problem, I add some Objects to a ComboBox. In the GUI i see now the objectsname and the ID. Is it possible to display instead a Attribute value of this object per Example the attribute name. You cant really identify the object over the ID. Now its "Class@73dds676d7" and i want to show a name like "Apple ...

20. Combo Box Problem    coderanch.com

Hi, I have made a combobox(say cb2). The desired functionality is that when i moove my mouse over that cb2 then only it's data should be populated. I am running a query from the database to populate this cb2 which is like 'select consignee from Con where buyer = ?'. And this '?' value is to be taken from another adjecent ...

21. combobox problem    coderanch.com

22. Problem in combo box    coderanch.com

hi.. I have one Frame and one Panel in that with some buttons... whenever i click a diff button the new Internal Frame is appeared... and in two Internal Frame I have Combo Box for selecting dates.. everything is working fine but now the problem is whenever i choose date in the combo box , items of combobox are appearde and ...

23. Problem with resizing JComboBox    coderanch.com

Hey guys. I really hope someone can help me, I'm having some weird bugs with JComboBoxes. I want to resize a combobox so that it looks, well, frankly, like a normal drop down list. Now I can modify the width without any problem. But try as I might, the height of the combobox fills the window from top to bottom. So ...

24. JComboBox problem...    coderanch.com

hey, i'm having a problem with getting the first item in the JComboBox() being selected. i have to select another item before i'm able to select the first item and trigger it. i'm using 1.6 : import java.awt.*; import javax.swing.*; import javax.swing.event.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class pizza extends JApplet { double lprice; double cprice; String s; JLabel pizza = ...

25. Accessibility of JComboBox problem    java-forums.org

Hi everyone! I've got two applications. One of them make changes in the components of the other one through the Accessibility API. (Both are running on the same VM) I make changes without problem in JButton, JTextComponent... But I've got a JComboBox with 4 options, and the "reader/writer" application has to select the third option, and I can't get a way ...

26. Problem with Jcombobox in Tablecell    java-forums.org

27. Problem in combobox    java-forums.org

dear sir, i have develped GUI,once enter the ipaddress in textfield and press the button the value in textfield is stored in combobox item,suppose, i am recompiled my code the added value is missing,this is my code,any body help me please private void pressActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: if (!iptext1.getText().equals("")){ int a = 0; for(int i ...

28. problem in combobox    java-forums.org

29. JComboBox problems    java-forums.org

Hello all, I'm having some problems with my program regarding JComboBoxes. My JComboBox won't display an array of StudentClass objects. :confused: Also, how would I be able to update the JComboBox which contains the array which would hold the StudentClass objects that that user input? Once I can get that to work, I need to figure out how to "delete" the ...

30. Serious Problem with JComboBox    java-forums.org

When the model of a combo box is changed by setting it to a certain index, usually using setSelectedIndex() or setSelectedItemAt(int index), the software (code) calls actionPerformed. This results in multiple stack calls to actionPerformed, that then unwind. This is undesirable if you have other code in actionPerformed that should only be go through once per actionPerformed call. Essentially combobox is ...

31. JComboBox problem    forums.oracle.com

32. JCombobox problem    forums.oracle.com

I want to select an item from my comboboxes without variable name because all comboboxes are created with JCombobox com = new JCombobox() ; ( no different variable name ) So ; I can't use "com.selectedIndex()" etc. but I assign name my comboboxes with .setName() method. Can I select different comboboxes with getName() method or another way ?

33. JComboBox problem    forums.oracle.com

I have a jcombobox which I bind it to and ArrayList of objects. I have no problem in showing the data that I want into the combobox (I overrode the toString() method for the objects that are goring to be showed in the combobox) but I cannot retrieve the selected object that I have bound to it previously. the getSelectedItem() method ...

34. problem with JComboBoxes?    forums.oracle.com

I want that setDayCombo() should be called when any month from ch2 or ch4 is selected, and 'Hello' should be printed when a day from ch1 or ch3 is selected. But, it's not working. It prints multiple 'Hello's when i select from ch1 or ch3, and prints even more 'Hello's when i select from ch2 or ch4.Plz tell me how can ...

35. jComboBox problem    forums.oracle.com

Hi I have got a strange problem with the jComboBox whenever I open the box in the application and search for an element by typing its first character if it has a component starting with that character in the box then it works fine but if it does not have any component starting with that character it simply generates a copy ...

36. JcomboBox + FOR - problem    forums.oracle.com

Hmmmm, I try creating code which I choose in JComoboBox1 value for example Items2 and I click the button. My first value Items2 will be include in string, next I choose value items 4 in JcomboBox and the second value will be in string. Now In string I have a 2 value: items 2 and items 4 And I will have ...

37. JComboBox problem in 1.5 (?)    forums.oracle.com

Hi I have just started to look at a problem discovered yesterday, but thought I would see if it was a known problem before spending too much time on it. Was unable to find anything about it elsewhere on the forum. Have a combobox class that was originally developed for java 1.4 and used in a Win2k platform. The combobox has ...

38. JComboBox Problem    forums.oracle.com

Hi there, Im only a beginner at Java and I am coming across some problems with my Combo Box. I curious to know how to display data in other text areas from combo boxes? I have some data that I want catorgarised. So everytime I select a particular item in the combobox i would like it to list that particular data ...

39. JComboBox Problem    forums.oracle.com