Skip to main content

All Questions

Tagged with
0 votes
0 answers
26 views

Get Foreign Key id of a table and make a list of the object ids assigned to it in a JComboBox

I want to the admin user to select an Id from a MySql database table and show an id list of the other columns that are assigned to the original Id that the person selected in a JComboBox and ...
Iann Schmith's user avatar
0 votes
1 answer
53 views

Editing non-String values in JComboBox

I have a JComboBox which displays items which are not Strings, although they do have a toString() method and can be displayed as Strings. I declare it as: public class AddressCombo extends JComboBox&...
mikera's user avatar
  • 106k
0 votes
1 answer
40 views

Repopulate a JComboBox model while maintaining current selection

I am new to Java and Java Swing but it is what I inherited. I am trying to figure out the best way to keep a combobox up to date with a changing list. If the user has already selected an item and ...
Joe's user avatar
  • 23
0 votes
1 answer
34 views

How to disable blue focus indicator effect inside JComboBox?

It looks like i am asking for help to disable the blue focus indicator effect inside a JComboBox in Java Swing. i want to remove the visual indication of focus (the blue border) when the JComboBox is ...
Mohamed Gharib's user avatar
-3 votes
1 answer
91 views

I want to show only the arrow in JComboBox

I have a JComboBox, but I want it to show only dropdown arrow, that is, without any space on left for the JComboBox element. But when I click the arrow, I want the list to go naturally, without it ...
MouseTheMilkLover's user avatar
1 vote
1 answer
38 views

Is there a way to center only the selected item in a JComboBox (so keep all items in the combo box left-aligned)

I know there is a simple way to center all the items in the JComboBox, but i have searched StackOverflow and across the web and there is no talk about how to center the selected item only. To make it ...
Chiselled's user avatar
0 votes
1 answer
18 views

CellEditor that puts one object's field/object to the JTable model, but you select it through dropdown based on another String property of that object

How to write own CellEditor that accepts list of non-String objects, shows the JComboBox dropdown with one filed of the Object, but when selected it adds another field of the Object to the JTable ...
Eljah's user avatar
  • 4,832
0 votes
1 answer
88 views

How do I Change the text in a JTextArea and JComboBox?

I Want to have a JTextArea and a JComboBox, that has some text, and after a while, it changes the text, but for some reason, it's not changing the text for the JTextArea, nor the JComboBox. Here's the ...
user avatar
0 votes
1 answer
63 views

How to get JComboBox value as enum value

I've created JComboBox like this: mode = new JComboBox(SpawnMode.values()); SpawnMode enum looks like this: public enum SpawnMode { POINT, RANDOM, INWARD_CIRCLE, RANDOM_CIRCLE } How do I ...
Fabian_Olczak's user avatar
0 votes
1 answer
55 views

Modify data type of JComboBox in Swing

I was trying to modify the data type of a combo box named cbLicense in Swing. In this case, I wanna change from String to CustomerItem which is a class. I use Swing design, so I selected the combo box,...
Lucia's user avatar
  • 69
-1 votes
1 answer
88 views

JComboBox how to remove editor

I want to remove the editor from a JComboBox to make the arrow button span the entire width of the box. I tried to use a custom ComboBoxUI to set the size and color of the arrow button. This partially ...
Bufflak's user avatar
-1 votes
1 answer
46 views

JComboBox change displayed text every time any change is made

I am trying to edit the displayed text (in the JComboBox itself, not the dropdown popup of options) every single time that any option is clicked/changed. I have a custom renderer that looks kind of ...
KHund's user avatar
  • 3
-1 votes
1 answer
59 views

DefaultTableModel update BUG, How can I resolve it?

I hope you can help me!!! I have a JComboBox, when I click the button "search" a JTable appears. When I change the selection of the JComboBox and click "search" again, the table ...
blink727_'s user avatar
1 vote
1 answer
41 views

Java Jtable Not Updating External Values

Im coding this math progam where the user buys and sells stocks and the table calculates the valuation based on price and amount of stocks the user has. (valuation = price*amt) I used a dropdown box ...
helpmepls's user avatar
0 votes
1 answer
55 views

JTable with JComboBox navigation and selection using keyboard only

I'd like to navigate on JTable using only a keyboard, and select values from JComboBox cells also only with a keyboard. I'm using Oracle Java JTable tutorial, the code is here: https://docs.oracle.com/...
asph galax's user avatar

15 30 50 per page
1
2 3 4 5
131