Questions tagged as 'swing'

1
answer

How to overlay a JInternalFrame?

The main screen of the system I'm developing opens automatically with% welcome%, and it contains some buttons for registration, calendar etc ... However, when I click on a button to call another JInternalFrame ( register or calendar ),...
asked by 12.09.2016 / 20:51
1
answer

How to identify the button that was clicked? [closed]

I have several buttons and I would like to compare the text of the button clicked with a variable of type String . This without using this: if (evento.getSource() == botaoXl) { // Fazer isto... } else if (evento.getSource() == bot...
asked by 30.07.2016 / 12:12
1
answer

How to open a JFrame passed as a parameter?

My idea is to open this window as a parameter without losing any attribute, for example, I have the class: public class Teste { JFrame janela = new JFrame; public ControllerJPreTransacao(JFrame janela) { this.janela...
asked by 13.06.2016 / 18:59
1
answer

How do I resize a JPanel within a JScrollPane automatically?

After adding a number of buttons greater than JPanel it supports, I would like to update (increase JPanel ) automatically, how can I do this? private JPanel contentPane; private static int tamanho = 429; public static void main(S...
asked by 28.05.2016 / 22:56
1
answer

How to add scrollbar in JPanel?

I'd like to add a scrollbar to a JPanel that uses Absolute Layout. package Default; import javax.swing.JFrame; import javax.swing.border.EmptyBorder; import java.awt.Dimension; import javax.swing.JButton; import javax...
asked by 16.05.2016 / 23:31
1
answer

How to use JProgressBar in ArrayList comparison classes?

I have a class that compares two ArrayList , one with user-added information and one with database query. After the query is done, I send this object to another class that performs writing that data to a file. I would like for as long a...
asked by 17.05.2016 / 13:33
1
answer

Leave only one column of the editable JTable

I have my data model that I did for testing as the code below shows: public class ModeloDados { private String nome; private String sobreNome; private String telefone; public ModeloDados(String nome, String sN, String fn){...
asked by 21.07.2016 / 15:00
1
answer

How to add values from JSpinners?

I want to make a simple program where the user puts a number in JSpinner and, when clicking a button, it will appear in another JSpinner , the value of the first added by 2. However, I can not make the sum between the value indicat...
asked by 23.06.2016 / 14:34
1
answer

Acquisition of data by JTable

I'm trying to get JButtonGuardar(panelInserir) to pass data entered by the user (local time text) from JPanelInserir to JPanelEventos (where is JTable) At the moment, I am not succeeding, if you have any suggestions, I wi...
asked by 21.04.2016 / 02:11
2
answers

JFormattedTextField is not accepting any characters

I have a window where we have a JFomattedTextField called txtQuantia , I applied a mask to it called mskQuantia , and set the valid characters, in this case 0-9, but this field is not accepting any characters. What can it be?...
asked by 22.06.2016 / 20:32