Questions tagged as 'swing'

1
answer

How to color specific lines of a JTable?

I'm developing a Java application that involves a JTable , I need to paint some red lines depending on the age and status of that line. I'm using a DefaultTableModel to populate my table. I do not know how to start. Could you...
asked by 06.02.2014 / 16:34
2
answers

Fixed column of a JTable in a JScrollPane

How do I leave a column of a fixed JTable (without scroll) inside a JScrollPane? I want to leave the first column of a fixed table, the scroll bar will only scroll from the second column onwards, the first one should always be visible. I e...
asked by 29.01.2014 / 18:26
1
answer

Error in logic control TV - Java

I'm a beginner in java and I'm having a hard time making the btnVolumeUp button increase the counter. First I have this TV class in which I created the methods. public class Televisor { int canal = 0; int volume = 0; boolean ligar =...
asked by 20.04.2015 / 20:57
1
answer

How to create a mask for JformattedTextField?

I'm doing a program that simulates the Turing Machine, and the user fills a form with the states like this {q0,q1,q2} . But I want to create a mask that the user types only q0q1q2 and the value is thus formatted {q0,q1} and all...
asked by 01.10.2017 / 00:42
1
answer

Insert data into a table from a Java form (Netbeans + SQL Server)

I have a form created so that you can enter data on a client and from that form open a button with a button that has the data, so far I have been able to make the button connection. Now my question is how can I send the form data to the table .....
asked by 03.06.2015 / 16:29
1
answer

Problems with JPanel exchange within JDialog using Swing

I'm having a problem with a system I'm developing with regard to screen switching. Sorry for the lengthy post, but I could not explain the problem otherwise. It has a JFrame principal with a menu that is JButtons and a JMenuBar ....
asked by 09.07.2015 / 22:51
1
answer

Assign a function to JComboBox

I have the following doubt, I have a combobox, and I want it when clicking on one of the combo options, it does something. I would like to know how I put a variable or method "bound" to combo options, for example if I clicked on option 1, it lis...
asked by 10.03.2017 / 18:17
1
answer

Clients do not communicate in the same multiplayer game in Java

I'm trying to make a simple multiplayer tank game by implementing chat. The game and the chat are all ok! However, I can not get 2 clients to see the same object Arena . In this case, each customer joining creates a tank in the arena. H...
asked by 13.11.2017 / 06:23
2
answers

Return information from the jtable row after selection

I have an application with 2 JFrames .. 1st JFrame: A screen with a search button and JTextField 2nd JFrame: A JTable with DB information. When I click the search button in the 1st Frame it opens the JTable with the DB informatio...
asked by 10.07.2016 / 19:48
1
answer

JTable does not save information when there is focus on cell [closed]

My JTable does not save the information when there is focus on the cell. In order to effectively save the information I need to manually focus and then click the "Register" button. How can I make this process automatic, every time I...
asked by 22.09.2014 / 21:06