Questions tagged as 'java-swing'

0
answers

Problem filling a combo box in java

It turns out that in a mysql database I have some registry and I need to be reflected in a java JComboBox but I can not find the error I have a class that takes care of the connection to the database and inside it I do that method 106 pub...
asked by 26.10.2018 / 09:36
1
answer

You doubt when creating a java component in netbeans

I have been programming for a short time and I am learning. My doubt is that I want to create a component (Bean) in netbeans that when I insert it in a Frame the button that I insert, I change the color of the button every time I press it. I'...
asked by 25.10.2018 / 19:38
0
answers

How can I repeat a Java Swing function?

Good I want to repeat my function that generates a random position in the frame and moves me a place label. But I execute function 1 only once. Does anyone have a solution? I leave the code, my idea is that when you press a -button, the function...
asked by 28.10.2018 / 23:34
0
answers

How to change a Jpanel for an external Jpanel?

Sorry for my ignorance, but my problem is how can I change a panel that is in my Jframe for another one that is outside of this one. I found a video on youtube ( this ) that teaches how, but when I run the code the panel does not change me, a...
asked by 22.10.2018 / 21:15
0
answers

Put two buttons together in Java Swing

I'm doing a job in which I want a map to be displayed (in this case, the state of Veracruz) that map is divided into sections, which I represent with a button as the user clicks on that area , you can access the information about it, the problem...
asked by 24.10.2018 / 23:23
0
answers

List in Table java

Good day, the problem is the following, I have an ArrayList of Employees and that I need to show in a JTable the problem is that you should search for an id, when looking for it you should only list the data of that person, it turns out that whe...
asked by 15.10.2018 / 10:16
0
answers

Error in java swing: java.lang.IllegalArgumentException: Width (0) and height (0) must be non-zero when putting image on a button

I'm making a game with linked lists, I have a node class which inherits from JButton (because I want each node to be a button), it's a set of stairs and snakes. At the moment I was indicating that the start and end of a staircase are two squa...
asked by 29.09.2018 / 16:57
1
answer

java Swing, How to add a jcombobox to a jpanel by setting the grid bag distribution by code?

The idea would be that when I add the combo I also configure the regilla bag distribution giving the weight of x in 1 and the dey in 0 in the distribution of the Jpanel. //El código sería el siguiente JComboBox cmbNomDocumentoJEP = new JCombo...
asked by 28.08.2018 / 15:21
0
answers

Is it possible to combine the rows and columns of a jtable?

To be able to combine the rows and columns of a jtable is to be able to manipulate it I do not find anything similar anywhere I would like to know if it is possible as it is done with html     
asked by 24.08.2018 / 02:53
2
answers

How to capture the click event of a Jcombobox

I have the following code for a jcombobox, where I need to be able to also capture the event when I click on one of the items in it. private void initComboKeyListener() { filterEditor.getFilterLabel().addKeyListener( new KeyAda...
asked by 29.08.2018 / 23:18