Questions tagged as 'swing'

1
answer

Get selected value of JComboBox populated with Enum

I have in my window a JComboBox with items from an enum, and a JLabel to show the value of the selected item in the combo. So far so good, I can do this, but I'm a little unsure if I'm doing it right, because I do not know if th...
asked by 02.04.2016 / 16:39
3
answers

how to select the entire row of a JTable using DefaultCellRenderer that changes the color of the line

Hello, I'm working with JTables, and in that JTable I needed to leave some lines in different colors, so I implemented the method class cellRenderModel extends DefaultTableCellRenderer { /** * */ private static final long serialVersionUID =...
asked by 23.05.2016 / 22:03
2
answers

Activate JButton from selection in JTable and remove the initial focus from the table

I have a window with a JTable , where only the selection of an entire row is valid, not just one field. The issue is that the window already opens with the first line selected, and I would like to disable it. In this same window I have...
asked by 24.04.2016 / 21:19
1
answer

Define which JFrames will be focused?

I need to keep a%% of focus in mind and not allow others to use it until I close this one. Every time you open a new frame the others below it must be inoperative. How can I do this?     
asked by 02.05.2016 / 15:01
1
answer

Definition of container and component in swing

What are the precise Container and Component definitions in Swing? Why are these elements important for building the GUI?     
asked by 20.03.2016 / 02:49
1
answer

Update JTable after each change of data in a cell

I'm using java
asked by 20.03.2016 / 18:58
1
answer

Is it possible to shorten the startup time of my application?

I've seen a lot of things here and StackOverflow in English about Swing and Runnable , even though I could not solve my problem. I am developing a work for college (interdisciplinary work, involving Distributed Systems / Advanced Data S...
asked by 12.10.2015 / 04:01
2
answers

How to call a method into an If and Else?

I'm developing software for an MVC (Model-view-controller) design video store and the problem is not calling the save () method and the change () method inside the If and Else on the Save button. If the typocadastro variable is "new" it saves an...
asked by 05.11.2015 / 20:23
1
answer

How to update a JLabel periodically?

I'd like to know how to periodically update a Jlabel , since this label depends on another method. In this case it would be lblNewLabel_1 . public class MenuGFinancas extends JFrame { private JPanel contentPane1; private S...
asked by 04.06.2015 / 20:59
1
answer

Failure in swing application response

I have a swing application in which I verify whether the word entered is right or wrong. String palavra[] = new String[3]; palavra[0] = "bar"; palavra[1] = "ola"; palavra[2] = "alo"; String p = jTextField1.getText(); int cont = 0; while (cont...
asked by 16.04.2015 / 03:41