Questions tagged as 'java-swing'

2
answers

Problem with combobox and duplicate items

I have a combobox that I fill it with data from mysql , the problem that I currently have is that the combobox doubles the values, for example, if I add 5 items, it will show me 5 and 5 others that are copies of the first, I leave...
asked by 27.11.2017 / 06:22
2
answers

how to fill a jtable from sql

I have a graphical interface that includes a jtable, at the time of registering, it runs normally, only in the jtable it shows me what I have registered repeatedly but in the database it is registered only once. Is there a way to fix it so th...
asked by 19.12.2017 / 21:28
1
answer

Change the color of the components while they have the pointer on them

Most swing components change color when they have the pointer on them. However, I would like to personalize that color (they are always painted blue), I have searched for information but I have not found anything. I am particularly interested in...
asked by 19.09.2017 / 09:10
2
answers

JAVA: Error: the main class Confirming2_App was not found or loaded

I have made a java GUI application with Swing and Netbeans. I can run it without problems from Netbeans or from console inside the directory of the application, nevertheless when taking the .jar to another directory (for example the desktop) I g...
asked by 30.05.2017 / 16:23
2
answers

Add actionListener to JButton dynamically

I have this code, which generates a window with a button. import javax.swing.*; import java.awt.*; import java.awt.event.*; public class PruebasGraficas { public static void main(String[] args) { JFrame Ventana1 = new JFrame();...
asked by 05.03.2017 / 21:35
1
answer

How to detect the right click on a JButton in java

I've been looking for the way but they all throw me a mistake, I'd like you to help me with this. I'm doing a minesweeper and I need to leave a caution flag when I right click. JButton boton = new JButton();     
asked by 05.03.2017 / 20:17
2
answers

Select multiple alternate rows in a JTable

At the moment I select a row and I click on the send button, it is recorded correctly but when I select several rows, only one row is recorded, as I would do so that all the rows I selected will be recorded. I share an image and the code with wh...
asked by 26.01.2017 / 22:22
1
answer

Assign column names to the JTable class

I have a simple application where an array of data passed to a JTable , I specify the names of the columns of the table, but only the data is displayed but not the names of the columns. Here the code: public class TableTest extends JFrame...
asked by 10.11.2016 / 19:57
1
answer

Is there a library for Voice recognition in Java? [closed]

I have already searched for my question to ask, and wanted to know if you know of any bookstore and how to use it? If you could give me a tutorial, pdf, etc. I would really appreciate it.     
asked by 16.10.2016 / 06:06
2
answers

Set several layouts in a Java window

I am trying to combine in the same window two JPannel , in one enter a GridLayout and in another to put a JButton that is not included in the Grid. The Grid view is displayed correctly but the JButton is not display...
asked by 08.10.2016 / 13:26